From 024155ab16f864083e5c62274c528b6ef3c4b86d Mon Sep 17 00:00:00 2001 From: scottmk Date: Fri, 17 Sep 2010 14:17:44 +0000 Subject: [PATCH] -- 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 git-svn-id: svn://svn.open-ils.org/ILS/trunk@17762 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql | 3 ++- .../Pg/upgrade/0405.schema.acq-hold-copy-map-drop-fkey.sql | 12 ++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0405.schema.acq-hold-copy-map-drop-fkey.sql diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 41f379e14..d3cafe394 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -68,7 +68,7 @@ CREATE TABLE config.upgrade_log ( 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, 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 0b3fc2ef7..83a2c6335 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 ('0403'); +INSERT INTO config.upgrade_log (version) VALUES ('0405'); -- Begin by upgrading permission.perm_list. This is fairly complicated. @@ -16146,6 +16146,7 @@ $$ LANGUAGE SQL; 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; diff --git a/Open-ILS/src/sql/Pg/upgrade/0405.schema.acq-hold-copy-map-drop-fkey.sql b/Open-ILS/src/sql/Pg/upgrade/0405.schema.acq-hold-copy-map-drop-fkey.sql new file mode 100644 index 000000000..7d61e29a0 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0405.schema.acq-hold-copy-map-drop-fkey.sql @@ -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; -- 2.11.0