[open-ils-commits] r17775 - trunk/Open-ILS/src/sql/Pg (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 17 15:12:10 EDT 2010
Author: scottmk
Date: 2010-09-17 15:12:05 -0400 (Fri, 17 Sep 2010)
New Revision: 17775
Modified:
trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
Log:
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
Modified: trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql 2010-09-17 19:12:03 UTC (rev 17774)
+++ trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql 2010-09-17 19:12:05 UTC (rev 17775)
@@ -3,7 +3,7 @@
-- 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 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
More information about the open-ils-commits
mailing list