LP#1737016 Stamping upgrade script for easing constraints on afs.code
authorDan Wells <dbw2@calvin.edu>
Tue, 27 Feb 2018 21:08:46 +0000 (16:08 -0500)
committerDan Wells <dbw2@calvin.edu>
Tue, 27 Feb 2018 21:08:46 +0000 (16:08 -0500)
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/1091.schema.lp1737016_afs_code.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lp1737016_afs_code.sql [deleted file]

index e8fa263..b230584 100644 (file)
@@ -92,7 +92,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');
 
     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 ('1090', :eg_version); -- berick/dbwells
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1091', :eg_version); -- jboyer/dbwells
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/1091.schema.lp1737016_afs_code.sql b/Open-ILS/src/sql/Pg/upgrade/1091.schema.lp1737016_afs_code.sql
new file mode 100644 (file)
index 0000000..9d0e69f
--- /dev/null
@@ -0,0 +1,9 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1091', :eg_version);
+
+ALTER TABLE acq.funding_source DROP CONSTRAINT funding_source_code_key;
+ALTER TABLE acq.funding_source ALTER COLUMN code SET NOT NULL;
+ALTER TABLE acq.funding_source ADD CONSTRAINT funding_source_code_once_per_owner UNIQUE (code,owner);
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lp1737016_afs_code.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lp1737016_afs_code.sql
deleted file mode 100644 (file)
index bea3fb5..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-ALTER TABLE acq.funding_source DROP CONSTRAINT funding_source_code_key;
-ALTER TABLE acq.funding_source ALTER COLUMN code SET NOT NULL;
-ALTER TABLE acq.funding_source ADD CONSTRAINT funding_source_code_once_per_owner UNIQUE (code,owner);
-
-COMMIT;