X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=remove_ou_data%2F15_clear_auditors.sql;h=20864e226d83a0343a573852e02148817bf1b690;hp=ab941c30fc57a26ec9c7053851d6e43a272951ac;hb=6b1c7d0b5585d2de5fac7d7803c475f88d560186;hpb=96c4a5bf729832f704dd86f2271d6f3531ebb4e9 diff --git a/remove_ou_data/15_clear_auditors.sql b/remove_ou_data/15_clear_auditors.sql index ab941c3..20864e2 100644 --- a/remove_ou_data/15_clear_auditors.sql +++ b/remove_ou_data/15_clear_auditors.sql @@ -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 au.id + FROM actor.usr + WHERE home_ou = :ou_to_del +); COMMIT;