[open-ils-commits] r17762 - in trunk/Open-ILS/src/sql/Pg: . upgrade (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 17 10:17:46 EDT 2010
Author: scottmk
Date: 2010-09-17 10:17:44 -0400 (Fri, 17 Sep 2010)
New Revision: 17762
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0405.schema.acq-hold-copy-map-drop-fkey.sql
Modified:
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
Log:
-- Dropping a foreign key (which has already been dropped from the
-- base installation scripts).
M Open-ILS/src/sql/Pg/002.schema.config.sql
M Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
A Open-ILS/src/sql/Pg/upgrade/0405.schema.acq-hold-copy-map-drop-fkey.sql
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-09-17 14:17:44 UTC (rev 17761)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-09-17 14:17:44 UTC (rev 17762)
@@ -68,7 +68,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0403'); -- dbwells via miker
+INSERT INTO config.upgrade_log (version) VALUES ('0405'); -- Scott McKellar
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
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 14:17:44 UTC (rev 17761)
+++ trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql 2010-09-17 14:17:44 UTC (rev 17762)
@@ -3,7 +3,7 @@
-- Highest-numbered individual upgrade script
-- incorporated herein:
-INSERT INTO config.upgrade_log (version) VALUES ('0403');
+INSERT INTO config.upgrade_log (version) VALUES ('0405');
-- Begin by upgrading permission.perm_list. This is fairly complicated.
@@ -16146,6 +16146,7 @@
ALTER TABLE action.in_house_use DROP CONSTRAINT in_house_use_item_fkey;
ALTER TABLE action.transit_copy DROP CONSTRAINT transit_copy_target_copy_fkey;
ALTER TABLE action.hold_transit_copy DROP CONSTRAINT ahtc_tc_fkey;
+ALTER TABLE action.hold_copy_map DROP CONSTRAINT hold_copy_map_target_copy_fkey;
ALTER TABLE asset.stat_cat_entry_copy_map DROP CONSTRAINT a_sc_oc_fkey;
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0405.schema.acq-hold-copy-map-drop-fkey.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0405.schema.acq-hold-copy-map-drop-fkey.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0405.schema.acq-hold-copy-map-drop-fkey.sql 2010-09-17 14:17:44 UTC (rev 17762)
@@ -0,0 +1,12 @@
+-- Drop a foreign key. It is commented out in 090.schema.action.sql
+-- but was never dropped via an upgrade script.
+
+-- No transaction, in case the fkey has already been dropped by
+-- other means.
+
+INSERT INTO config.upgrade_log (version) VALUES ('0405'); -- Scott McKellar
+
+\qecho If the following ALTER TABLE fails because the constraint
+\qecho being dropped doesn't exist, that's okay. Ignore the failure.
+
+ALTER TABLE action.hold_copy_map DROP CONSTRAINT hold_copy_map_target_copy_fkey;
More information about the open-ils-commits
mailing list