Koha-clms/installer/data/mysql
Nick Clemens d69d218d68
Bug 42068: Bug 26993 (follow-up) Don't use FOREIGN_KEY_CHECKS
To test:
1 - Checkout 25.11.x - reset_all
2 - Enable StoreLastBorrower
3 - Issue an item
4 - Ensure item has a row in items_last_borrower
    SELECT * FROM items_last_borrower
5 - Checkout main
6 - updatedatabase
7 - Try to delete any item, doesn't have to be the one you issued
    DELETE FROM items WHERE itemnumber=93;
8 - ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`koha_kohadev`.`items_last_borrower`, CONSTRAINT `items_last_borrower_ibfk_1` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE)

9 - repeat 1-5
10 - APPLY PATCH
11 - updatedatabase
12 - Try to delete any item
13 - Success!
14 - Delete the item you issued previously (in the staff interface on via mysql)
15 - Confirm no rows in items_last_borrower

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-12 15:02:42 -06:00
..
atomicupdate Bug 23260: DBRev 25.12.00.028 2026-03-05 08:33:51 -07:00
db_revs Bug 42068: Bug 26993 (follow-up) Don't use FOREIGN_KEY_CHECKS 2026-03-12 15:02:42 -06:00
en Bug 3492: (follow-up) Remove last reservefee references 2026-02-09 12:57:57 -07:00
localization Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
mandatory Bug 23260: Database updates and new system preferences AnonymizeLastBorrower / AnonymizeLastBorrowerDays 2026-03-05 08:33:44 -07:00
backfill_statistics.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
fix_unclosed_nonaccruing_fines_bug17135.pl Bug 41076: Adjust our perl tidiness for v20250105 2026-02-05 09:03:51 -07:00
kohastructure.sql Bug 41409: Add COMMENT to kohastructure 2026-03-05 12:56:26 -07:00
labels_upgrade.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06: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 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
update22to30.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
updatedatabase.pl Bug 38384: (follow-up) move require Koha::Plugins to use 2026-02-25 07:37:00 -07:00