[Koha-bugs] [Bug 30451] Delete a subscription deletes the linked order
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Jul 21 17:11:31 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30451
--- Comment #6 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 153799
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153799&action=edit
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
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list