X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=remove_ou_data%2F12_remove_more_patron_extras.sql;h=b3a64deb167d8f584249cf75e6b3e240a0dde030;hp=a9a2dc2bb219a8b25282267271da2c2ca2e21030;hb=e327c4743fe61686222f0e3928a48ece319a1e3b;hpb=c919228a7234c1fdfa9f9cfbae245fc30731eb85 diff --git a/remove_ou_data/12_remove_more_patron_extras.sql b/remove_ou_data/12_remove_more_patron_extras.sql index a9a2dc2..b3a64de 100644 --- a/remove_ou_data/12_remove_more_patron_extras.sql +++ b/remove_ou_data/12_remove_more_patron_extras.sql @@ -25,5 +25,7 @@ DELETE FROM action.non_cataloged_circulation WHERE patron IN (SELECT id FROM actor.usr WHERE home_ou IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del)); DELETE FROM action.non_cataloged_circulation WHERE staff IN (SELECT id FROM actor.usr WHERE home_ou IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del)); +DELETE FROM action.usr_circ_history WHERE usr IN +(SELECT id FROM actor.usr WHERE home_ou IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del)); COMMIT;