Koha/installer/data/mysql
Katrin Fischer 43c55cad8a Bug 30451: Update FK constraint on aqorders.subscriptionid
This updates the FK constrant from ON DELETE CASCADE to ON DELETE
SET NULL. This means that if a subscription linked to an order is
deleted, we no longer will also delete the order, but we will just
set subscrptinid in the order to NULL. This will avoid data loss
that can cause the budgets/funds not to add up anymore with the
real espenses of the library.

To test:

Preparation:
* Create 2 subscriptions on different records
* Create a new basket
* Use the "order from subscription" functionality to create order
  lines for both of your subscriptions
* Close basket

Without patch:
* Delete the first subscription
* Verify the order line for this subscription is gone from your basket

Apply patch:
* Run database update and restart_all
* Delete the second subscription
* Verify the order line now remained in the basket

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>

JD amended patch: perl tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 765d3d85b5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-08-17 08:45:43 -10:00
..
atomicupdate Bug 30451: Update FK constraint on aqorders.subscriptionid 2023-08-17 08:45:43 -10:00
db_revs Bug 33028: DBRev 23.05.01.004 2023-08-07 20:05:43 -10:00
en Bug 34332: Removed extra parenthesis that was causing an error 2023-08-07 20:05:46 -10:00
localization Bug 33192: (QA follow-up) Fix it-IT sample data and unit tests 2023-04-14 11:35:40 -03:00
mandatory Bug 33117: (follow-up) Rename preference 2023-07-17 14:44:22 +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 30451: Update FK constraint on aqorders.subscriptionid 2023-08-17 08:45:43 -10:00
labels_upgrade.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +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 33720: Update the updatedatabase.pl script to flush caches before running 2023-07-17 15:50:20 +01:00