removed nulling of parent circs where child circ is at non-deleted library
authorRogan Hamby <rhamby@esilibrary.com>
Mon, 17 Oct 2016 18:44:56 +0000 (14:44 -0400)
committerRogan Hamby <rhamby@esilibrary.com>
Mon, 17 Oct 2016 18:44:56 +0000 (14:44 -0400)
remove_ou_data/04_remove_circ.sql

index 3073085..4780c9d 100644 (file)
@@ -24,10 +24,6 @@ ALTER TABLE action.circulation DISABLE TRIGGER age_parent_circ;
 
 BEGIN;
 
-UPDATE action.circulation SET parent_circ = NULL WHERE parent_circ
-(SELECT id FROM action.circulation WHERE circ_lib = (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del))
-AND circ_lib NOT IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del);
-
 DELETE FROM action.circulation 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));