missed a constraint change in the 0307 upgrade script
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 11 Jun 2010 22:28:44 +0000 (22:28 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 11 Jun 2010 22:28:44 +0000 (22:28 +0000)
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
Open-ILS/src/sql/Pg/upgrade/0308.schema.serials-rearrangement-fix.sql [new file with mode: 0644]

index d8a0c54..0d1ebd6 100644 (file)
@@ -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 (file)
index 0000000..ef625ab
--- /dev/null
@@ -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;
+