add disable/renable rule so that copy locations can be deleted in remove_ou scripts
[migration-tools.git] / remove_ou_data / 15_clear_auditors.sql
index ab941c3..685d1cb 100644 (file)
@@ -37,5 +37,9 @@ DELETE FROM auditor.asset_call_number_history WHERE owning_lib IN (
     FROM actor.org_unit
     WHERE shortname = :ou_to_del
 );
-
+DELETE FROM auditor.actor_usr_address_history WHERE usr IN (
+    SELECT id
+    FROM actor.usr
+    WHERE home_ou = (SELECT id FROM actor.org_unit WHERE shortname = :ou_to_del)
+);
 COMMIT;