From 7db0507d7445b4762ecbc0a245cc55430bffe0ce Mon Sep 17 00:00:00 2001 From: Rogan Hamby Date: Mon, 27 Feb 2017 08:33:59 -0500 Subject: [PATCH] add removing call number suffixes and prefixes to remove_ou scripts --- remove_ou_data/07_remove_volumes.sql | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/remove_ou_data/07_remove_volumes.sql b/remove_ou_data/07_remove_volumes.sql index 5eaec2e..71fc03a 100644 --- a/remove_ou_data/07_remove_volumes.sql +++ b/remove_ou_data/07_remove_volumes.sql @@ -39,6 +39,12 @@ FROM asset.call_number WHERE owning_lib IN DELETE FROM asset.call_number WHERE owning_lib IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); +DELETE FROM asset.call_number_prefix WHERE owning_lib IN +(SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); + +DELETE FROM asset.call_number_suffix WHERE owning_lib IN +(SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); + COMMIT; ALTER TABLE asset.call_number ENABLE RULE protect_cn_delete; -- 1.7.2.5