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