Koha/installer/data/mysql
Emmi Takkinen df888200a1
Bug 37820: Upgrade fails at 23.12.00.023 [Bug 36993]
If table aqbudgets is miissing foreign key
'aqbudgetperiods_ibfk_1' database update fails on
"Can't DROP FOREIGN KEY" error.

To test:
1. Remove changes made in bug 32132, drop foreign key
aqbudgetperiods_ibfk_1 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";
- ALTER TABLE aqbudgets DROP FOREIGN KEY aqbudgetperiods_ibfk_1;
- UPDATE systempreferences SET value="23.1200022" WHERE variable = "Version;
2. Upgrade your database (e.g. running installer/data/mysql/updatedatabase.pl)
=> Update fails on error "Can't DROP FOREIGN KEY `aqbudgetperiods_ibfk_1`;...".
4. Apply this patch.
5. Try to update your database again.
=> Database should now be upgraded succesfully.
=> Confirm table aqbudgets now contains 'aqbudgetperiods_ibfk_1'.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 12:02:46 +02:00
..
atomicupdate Bug 20411: DBRev 24.06.00.026 2024-08-26 17:39:47 +02:00
db_revs Bug 37820: Upgrade fails at 23.12.00.023 [Bug 36993] 2024-09-13 12:02:46 +02:00
en Bug 36915: (QA follow-up) Passing less to encourage traversal 2024-08-27 12:14:20 +02:00
localization
mandatory Bug 34185: Capitalized OPAC in OpacItemLocation syspref 2024-09-02 12:13:43 +02:00
backfill_statistics.pl
fix_unclosed_nonaccruing_fines_bug17135.pl
kohastructure.sql Bug 35044: DB changes + atomicupdate file 2024-08-23 18:21:19 +02:00
labels_upgrade.pl
patroncards_upgrade.pl
update22to30.pl
updatedatabase.pl Bug 34185: Capitalized OPAC in OpacItemLocation syspref 2024-09-02 12:13:43 +02:00