From: Bill Erickson Date: Mon, 17 Dec 2018 22:01:45 +0000 (-0500) Subject: LP1806968 Stamping SQL upgrade: Vand. session tracker fixes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4fca2c7ba62469646fe6aea141304f5d35b54105;p=contrib%2FConifer.git LP1806968 Stamping SQL upgrade: Vand. session tracker fixes Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index dbe280dc88..1c72349def 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -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'); -INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1140', :eg_version); -- dyrcona/bshum +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1141', :eg_version); -- khuckins/berick/jboyer CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/1141.schema.vandelay-record-type-fix.sql b/Open-ILS/src/sql/Pg/upgrade/1141.schema.vandelay-record-type-fix.sql new file mode 100644 index 0000000000..69cb971c38 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/1141.schema.vandelay-record-type-fix.sql @@ -0,0 +1,14 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('1141', :eg_version); + +ALTER TABLE vandelay.session_tracker + ALTER COLUMN record_type TYPE TEXT, + ALTER COLUMN record_type SET DEFAULT 'bib'::TEXT; + +ALTER TABLE vandelay.session_tracker + ADD CONSTRAINT vand_tracker_valid_record_type + CHECK (record_type IN ('bib', 'authority')); + +COMMIT; + diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.vandelay-record-type-fix.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.vandelay-record-type-fix.sql deleted file mode 100644 index 0ba8a6ee1c..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.vandelay-record-type-fix.sql +++ /dev/null @@ -1,14 +0,0 @@ -BEGIN; - ---SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); - -ALTER TABLE vandelay.session_tracker - ALTER COLUMN record_type TYPE TEXT, - ALTER COLUMN record_type SET DEFAULT 'bib'::TEXT; - -ALTER TABLE vandelay.session_tracker - ADD CONSTRAINT vand_tracker_valid_record_type - CHECK (record_type IN ('bib', 'authority')); - -COMMIT; -