X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=remove_ou_data%2F07_remove_volumes.sql;h=71fc03a4c816f689f23228b47b4816d9d2f6b85b;hp=5eaec2e06daf984a61612a2df8522a84cb6bf5ba;hb=7db0507d7445b4762ecbc0a245cc55430bffe0ce;hpb=cbf98af9e9d79cee9f8c99267c3e39326487167e 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;