Koha-clms/installer/data/mysql
Emmi Takkinen c97b32a60e Bug 36993: Upgrade fails at 23.12.00.023 [Bug 32132]
Database update fails on some databases because of
foreign key constraint error. This comes from attempt
to make column aqbudgets.budget_period_id not accept
NULL values. Update also fails if there are rows where
column aqbudgets.budget_period_id doesn't match any
values in aqbudgetperiods.budget_period_id.

To test:
1. Remove changes made in bug 32132 and downgrade your database:
- ALTER TABLE aqbudgets MODIFY COLUMN `budget_period_id` INT(11) NULL;
- UPDATE aqbudgets SET budget_period_id = NULL
WHERE budget_period_id IN(SELECT budget_period_id FROM aqbudgetperiods
WHERE budget_period_description = "Budget for funds without budget");
- DELETE FROM aqbudgetperiods
WHERE budget_period_description = "Budget for funds without budget";
- UPDATE systempreferences SET value="23.1200022" WHERE variable = "Version;
2. Upgrade your database (e.g. running installer/data/mysql/updatedatabase.pl)
=> Update fails on foreign key constraint error.
4. Apply this patch.
5. Try to update your database again.
=> Database should now be upgraded succesfully.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 309127226f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-06-06 10:45:45 +02:00
..
atomicupdate Bug 36986: DBRev 24.05.00.001 2024-06-06 10:37:44 +02:00
db_revs Bug 36993: Upgrade fails at 23.12.00.023 [Bug 32132] 2024-06-06 10:45:45 +02:00
en Bug 35925: Adjust default purchase suggestion notices to use TT 2024-05-10 15:19:05 +02:00
localization Bug 34558: Update custom.sql for it-IT webinstaller 2023-10-09 11:41:31 -03:00
mandatory Bug 26176: (QA follow-up) Also rename StaffLoginBranchBasedOnIP 2024-05-23 17:51:19 +02: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 24.05.00: Update kohastructure.sql 2024-05-27 18:26:44 +02:00
labels_upgrade.pl
…
patroncards_upgrade.pl
…
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 34685: Make updatedatabase.pl propagate the error 2023-09-06 15:05:21 -03:00