adding a foreign key check for selction_ou on action.hold_request
[evergreen-equinox.git] / Open-ILS / src / sql / Pg / 090.schema.action.sql
index 69d6b03..7ce47d3 100644 (file)
@@ -472,7 +472,7 @@ CREATE TABLE action.hold_request (
        request_lib             INT                             NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
        requestor               INT                             NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
        usr                     INT                             NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
-       selection_ou            INT                             NOT NULL,
+       selection_ou            INT                             NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
        selection_depth         INT                             NOT NULL DEFAULT 0,
        pickup_lib              INT                             NOT NULL REFERENCES actor.org_unit DEFERRABLE INITIALLY DEFERRED,
        hold_type               TEXT                            REFERENCES config.hold_type (hold_type) DEFERRABLE INITIALLY DEFERRED,