Stamping upgrade scripts for Z-source attr DELETE cascade (and repairing previous...
authorMike Rylander <mrylander@gmail.com>
Wed, 13 Mar 2013 18:52:16 +0000 (14:52 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 13 Mar 2013 18:52:16 +0000 (14:52 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0774.schema.z3950_credentials.sql
Open-ILS/src/sql/Pg/upgrade/0775.schema.config_z3950_source_attr_cascade_delete.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.config_z3950_source_attr_cascade_delete.sql [deleted file]

index a7db50d..a11edd5 100644 (file)
@@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0774', :eg_version); -- berick/miker
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0775', :eg_version); -- berick/miker
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index 739b20f..d989230 100644 (file)
@@ -1,7 +1,7 @@
 
 BEGIN;
 
-SELECT evergreen.upgrade_deps_block_check('0773', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0774', :eg_version);
 
 CREATE TABLE config.z3950_source_credentials (
     id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0775.schema.config_z3950_source_attr_cascade_delete.sql b/Open-ILS/src/sql/Pg/upgrade/0775.schema.config_z3950_source_attr_cascade_delete.sql
new file mode 100644 (file)
index 0000000..fefe5a5
--- /dev/null
@@ -0,0 +1,15 @@
+
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0775', :eg_version);
+
+ALTER TABLE config.z3950_attr
+    DROP CONSTRAINT z3950_attr_source_fkey,
+    ADD CONSTRAINT z3950_attr_source_fkey 
+        FOREIGN KEY (source) 
+        REFERENCES config.z3950_source(name) 
+        ON UPDATE CASCADE
+        ON DELETE CASCADE
+        DEFERRABLE INITIALLY DEFERRED;
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.config_z3950_source_attr_cascade_delete.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.config_z3950_source_attr_cascade_delete.sql
deleted file mode 100644 (file)
index 9b99364..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-ALTER TABLE config.z3950_attr
-    DROP CONSTRAINT z3950_attr_source_fkey,
-    ADD CONSTRAINT z3950_attr_source_fkey 
-        FOREIGN KEY (source) 
-        REFERENCES config.z3950_source(name) 
-        ON UPDATE CASCADE
-        ON DELETE CASCADE
-        DEFERRABLE INITIALLY DEFERRED;
-
-COMMIT;