Koha-clms/installer/data/mysql
Emmi Takkinen a84195d7da
Bug 38602: Do not check if columns bookings.creation_date and bookings.modification_date from information_schema
If one has multiple databases in use adding columns
bookings.creation_date and bookings.modification_date is added
just to first updated database and skipped in other updates.
This happens because we check if these columns already exist
in database from information_schema. We should instead make
this check with method column_exists.

To test:
1. Apply this patch.
3. Drop columns bookings.creation_date and bookings.modification_date:
ALTER TABLE bookings DROP COLUMN creation_date;
ALTER TABLE bookings DROP COLUMN modification_date;
2. Revert your database back to version 24.0600028:
UPDATE systempreferences SET value = "24.0600014" WHERE variable = "version";
3. Run updatedatabase.pl.
=> Check that columns were added.

If you happen to have two databases:
1. Check if you have columns in your bookings table:
SELECT DISTINCT TABLE_SCHEMA, TABLE_NAME FROM
INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME IN
('creation_date', 'modification_date');
=> Note that columns exist only in one of the databases.
2. Make sure you're using database missing columns
from booking table.
3. Apply this patch.
4. Revert back to version 24.0600028.
5. Run updatedatabase.pl
=> Check that columns were now added to database.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-05 13:57:15 +01:00
..
atomicupdate Bug 37292: DBRev 24.12.00.002 2024-12-03 17:34:03 +01:00
db_revs Bug 38602: Do not check if columns bookings.creation_date and bookings.modification_date from information_schema 2024-12-05 13:57:15 +01:00
en Bug 38622: Update sample patron data with preferred_name 2024-12-04 16:32:48 +01:00
localization Bug 27490: (follow-up) Fix custom installer files 2024-09-13 13:54:26 +02:00
mandatory Bug 34355: (QA follow-up) Add permission marc_order_manage to govern control of account creation 2024-11-11 17:43:15 +01:00
backfill_statistics.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
fix_unclosed_nonaccruing_fines_bug17135.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
kohastructure.sql Bug 37292: Add an index on oauth_access_tokens.expires 2024-12-03 17:34:03 +01:00
labels_upgrade.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
needs_update.pl Bug 34088: Move the 'needs update' test to a separate script 2024-09-17 10:48:39 +02:00
patroncards_upgrade.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
update22to30.pl Bug 29180: (QA follow-up) Don't alter old DB up date 2021-11-05 12:13:25 +01:00
updatedatabase.pl Bug 38299: (follow-up) (discussion) Move failure into same level 2024-11-18 17:44:40 +01:00