From 6e555db9285a6e19b0d865e06b84ec8c322bb43f Mon Sep 17 00:00:00 2001 From: scottmk Date: Wed, 8 Jul 2009 04:43:03 +0000 Subject: [PATCH] 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 --- Open-ILS/src/sql/Pg/090.schema.action.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.11.0