From: scottmk Date: Wed, 8 Jul 2009 04:43:03 +0000 (+0000) Subject: Add an ON DELETE CASCADE clause to the foreign key pointing X-Git-Tag: sprint4-merge-nov22~9725 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6e555db9285a6e19b0d865e06b84ec8c322bb43f;p=working%2FEvergreen.git Add an ON DELETE CASCADE clause to the foreign key pointing from action.hold_notification to action.hold_request. git-svn-id: svn://svn.open-ils.org/ILS/trunk@13521 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql index b0db67dbd1..963906ab89 100644 --- a/Open-ILS/src/sql/Pg/090.schema.action.sql +++ b/Open-ILS/src/sql/Pg/090.schema.action.sql @@ -313,8 +313,10 @@ CREATE INDEX ahrn_hold_idx ON action.hold_request_note (hold); CREATE TABLE action.hold_notification ( id SERIAL PRIMARY KEY, - hold INT NOT NULL REFERENCES action.hold_request (id) DEFERRABLE INITIALLY DEFERRED, - notify_staff INT REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, + hold INT NOT NULL REFERENCES action.hold_request (id) + ON DELETE CASCADE + DEFERRABLE INITIALLY DEFERRED, + notify_staff INT REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, notify_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), method TEXT NOT NULL, -- email address or phone number note TEXT