X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=remove_ou_data%2F03_remove_holds.sql;h=433f3efdd69997a6c03f567d624d4cc4e8b45302;hp=76dfa1469c994cc848234f1927f968a713ce1aca;hb=96c4a5bf729832f704dd86f2271d6f3531ebb4e9;hpb=099b914088e5adbba5b47f4f18514ce419b1af6a diff --git a/remove_ou_data/03_remove_holds.sql b/remove_ou_data/03_remove_holds.sql index 76dfa14..433f3ef 100644 --- a/remove_ou_data/03_remove_holds.sql +++ b/remove_ou_data/03_remove_holds.sql @@ -41,6 +41,9 @@ DELETE FROM action.aged_hold_request WHERE request_lib IN DELETE FROM action.hold_request WHERE requestor 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.hold_request WHERE fulfillment_lib IN +(SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); + COMMIT; ALTER TABLE action.hold_request ENABLE TRIGGER action_hold_request_aging_tgr;