From 0913dc6cb4739156e3a982cb96d262f758496234 Mon Sep 17 00:00:00 2001 From: scottmk Date: Fri, 17 Sep 2010 19:12:05 +0000 Subject: [PATCH] Restore two foreign keys that were somehow inadvertently dropped, probably by some funky interaction with inheritance. M Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql git-svn-id: svn://svn.open-ils.org/ILS/trunk@17775 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql index 83a2c6335f..1ce8881dbf 100644 --- a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql +++ b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql @@ -3,7 +3,7 @@ BEGIN; -- Highest-numbered individual upgrade script -- incorporated herein: -INSERT INTO config.upgrade_log (version) VALUES ('0405'); +INSERT INTO config.upgrade_log (version) VALUES ('0403'); -- Begin by upgrading permission.perm_list. This is fairly complicated. @@ -17864,6 +17864,19 @@ ALTER TABLE acq.provider_contact ALTER TABLE actor.stat_cat ADD COLUMN usr_summary BOOL NOT NULL DEFAULT FALSE; +-- Recreate some foreign keys that were somehow dropped, probably +-- by some kind of cascade from an inherited table: + +ALTER TABLE action.reservation_transit_copy + ADD CONSTRAINT artc_tc_fkey FOREIGN KEY (target_copy) + REFERENCES booking.resource(id) + ON DELETE CASCADE + DEFERRABLE INITIALLY DEFERRED, + ADD CONSTRAINT reservation_transit_copy_reservation_fkey FOREIGN KEY (reservation) + REFERENCES booking.reservation(id) + ON DELETE SET NULL + DEFERRABLE INITIALLY DEFERRED; + COMMIT; -- Some operations go outside of the transaction, because they may -- 2.11.0