add removing usr circ history to remove_ou scripts
authorRogan Hamby <rhamby@esilibrary.com>
Mon, 27 Feb 2017 13:34:45 +0000 (08:34 -0500)
committerRogan Hamby <rhamby@esilibrary.com>
Mon, 27 Feb 2017 13:34:45 +0000 (08:34 -0500)
remove_ou_data/12_remove_more_patron_extras.sql

index a9a2dc2..b3a64de 100644 (file)
@@ -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;