Add versioned upgrade script for "Bib source: can have copies"
authorDan Scott <dscott@laurentian.ca>
Mon, 5 Dec 2011 18:32:23 +0000 (13:32 -0500)
committerDan Scott <dscott@laurentian.ca>
Mon, 5 Dec 2011 18:32:23 +0000 (13:32 -0500)
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0655.config.bib_source.can_have_copies.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.config.bib_source.can_have_copies.sql [deleted file]

index fa53141..8852183 100644 (file)
@@ -86,7 +86,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 ('0654', :eg_version); -- phasefx/tsbere
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0655', :eg_version); -- dyrcona/dbs
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0655.config.bib_source.can_have_copies.sql b/Open-ILS/src/sql/Pg/upgrade/0655.config.bib_source.can_have_copies.sql
new file mode 100644 (file)
index 0000000..6d34581
--- /dev/null
@@ -0,0 +1,15 @@
+-- Evergreen DB patch 0655.config.bib_source.can_have_copies.sql
+--
+-- This column introduces the ability to prevent bib records associated
+-- with specific bib sources from being able to have volumes or MFHD
+-- records attached to them.
+--
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0655', :eg_version);
+
+ALTER TABLE config.bib_source
+ADD COLUMN can_have_copies BOOL NOT NULL DEFAULT TRUE;
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.config.bib_source.can_have_copies.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.config.bib_source.can_have_copies.sql
deleted file mode 100644 (file)
index 102da7a..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE config.bib_source
-ADD COLUMN can_have_copies BOOL NOT NULL DEFAULT TRUE;