From 9b6e2c33e276d1649fcd60858ed064732e3b2ef7 Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 11 Jun 2010 22:28:44 +0000 Subject: [PATCH] missed a constraint change in the 0307 upgrade script git-svn-id: svn://svn.open-ils.org/ILS/trunk@16693 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- .../src/sql/Pg/upgrade/0308.schema.serials-rearrangement-fix.sql | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0308.schema.serials-rearrangement-fix.sql diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index d8a0c54c2..0d1ebd629 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 ('0306'); -- atz +INSERT INTO config.upgrade_log (version) VALUES ('0308'); -- miker CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0308.schema.serials-rearrangement-fix.sql b/Open-ILS/src/sql/Pg/upgrade/0308.schema.serials-rearrangement-fix.sql new file mode 100644 index 000000000..ef625abcd --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0308.schema.serials-rearrangement-fix.sql @@ -0,0 +1,9 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0308'); --miker + +ALTER TABLE serial.subscription DROP CONSTRAINT subscription_record_entry_fkey; +ALTER TABLE serial.subscription ADD CONSTRAINT subscription_record_entry_fkey FOREIGN KEY (record_entry) REFERENCES biblio.record_entry (id) DEFERRABLE INITIALLY DEFERRED; + +COMMIT; + -- 2.11.0