X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=remove_ou_data%2F01_easy_deletes.sql;h=2af88330872d8b4dbe535898c405ddcf305849f9;hp=e6d58ec9a9634c7846231758b4cac74b0bf8e3d9;hb=9a3207573976451e12bce078decca416dc4b5c3c;hpb=c919228a7234c1fdfa9f9cfbae245fc30731eb85 diff --git a/remove_ou_data/01_easy_deletes.sql b/remove_ou_data/01_easy_deletes.sql index e6d58ec..2af8833 100644 --- a/remove_ou_data/01_easy_deletes.sql +++ b/remove_ou_data/01_easy_deletes.sql @@ -80,5 +80,7 @@ DELETE FROM vandelay.import_bib_trash_group WHERE owner IN (SELECT (actor.org_un DELETE FROM vandelay.import_item_attr_definition WHERE owner IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); DELETE FROM vandelay.match_set WHERE owner IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); DELETE FROM vandelay.merge_profile WHERE owner IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); - +DELETE FROM asset.copy_tag_copy_map WHERE copy IN (SELECT id FROM asset.copy WHERE circ_lib IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del)); +DELETE FROM asset.copy_tag WHERE owner IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); +DELETE FROM config.copy_tag_type WHERE owner IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); COMMIT;