From 06e695c596e784a9e2634b25612b4bd23ac047af Mon Sep 17 00:00:00 2001 From: Rogan Hamby Date: Mon, 27 Feb 2017 08:35:55 -0500 Subject: [PATCH] add disable/renable rule so that copy locations can be deleted in remove_ou scripts --- remove_ou_data/14_remove_ou_extras.sql | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/remove_ou_data/14_remove_ou_extras.sql b/remove_ou_data/14_remove_ou_extras.sql index 781090a..08bab80 100644 --- a/remove_ou_data/14_remove_ou_extras.sql +++ b/remove_ou_data/14_remove_ou_extras.sql @@ -21,6 +21,7 @@ create index tmp_idx on money.billing(btype); ALTER TABLE action.circulation DISABLE TRIGGER action_circulation_target_copy_trig; +ALTER TABLE asset.copy_location DISABLE RULE protect_copy_location_delete; BEGIN; @@ -68,4 +69,5 @@ DELETE FROM action_trigger.event_definition COMMIT; DROP INDEX money.tmp_idx; +ALTER TABLE asset.copy_location ENABLE RULE protect_copy_location_delete; ALTER TABLE action.circulation ENABLE TRIGGER action_circulation_target_copy_trig; -- 1.7.2.5