From: Dan Scott Date: Mon, 5 Dec 2011 18:32:23 +0000 (-0500) Subject: Add versioned upgrade script for "Bib source: can have copies" X-Git-Tag: sprint4-merge-nov22~4765 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c4e56c4c40c6a69887834a2fd5d7d099c9987097;p=working%2FEvergreen.git Add versioned upgrade script for "Bib source: can have copies" Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index fa531418f1..88521830fa 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -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 index 0000000000..6d34581eb8 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0655.config.bib_source.can_have_copies.sql @@ -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 index 102da7a4ff..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.config.bib_source.can_have_copies.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE config.bib_source -ADD COLUMN can_have_copies BOOL NOT NULL DEFAULT TRUE;