From: Jason Stephenson Date: Wed, 2 Sep 2015 16:00:15 +0000 (-0400) Subject: LP#1484281: Stamping Upgrade Script. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d0afea424cedc206a46a315cd50d937d6cb7343d;p=evergreen%2Fmasslnc.git LP#1484281: Stamping Upgrade Script. Signed-off-by: Jason Stephenson --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index d58b92229a..c5d3d44525 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -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 ('0940', :eg_version); -- miker/jboyer/csharp/dyrcona +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0941', :eg_version); -- yboston/dyrcona CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0941.data.authority.control_set_authority_field-remove-sf-e.sql b/Open-ILS/src/sql/Pg/upgrade/0941.data.authority.control_set_authority_field-remove-sf-e.sql new file mode 100644 index 0000000000..c2c1224ff7 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0941.data.authority.control_set_authority_field-remove-sf-e.sql @@ -0,0 +1,9 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('0941', :eg_version); + +UPDATE authority.control_set_authority_field SET sf_list = REGEXP_REPLACE( sf_list, 'e', '', 'i') WHERE tag = '100' AND control_set = 1 AND sf_list ILIKE '%e%'; + +UPDATE authority.control_set_authority_field SET sf_list = REGEXP_REPLACE( sf_list, 'e', '', 'i') WHERE tag = '110' AND control_set = 1 AND sf_list ILIKE '%e%'; + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.authority.control_set_authority_field-remove-sf-e.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.authority.control_set_authority_field-remove-sf-e.sql deleted file mode 100644 index b33c00b029..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.authority.control_set_authority_field-remove-sf-e.sql +++ /dev/null @@ -1,11 +0,0 @@ -BEGIN; - -INSERT INTO config.upgrade_log (version) VALUES ('XXXX'); - --- TODO: ask community if I should be warnign users that my code only fixes 100 & 110 auth tags for default (id=1) control set - -UPDATE authority.control_set_authority_field SET sf_list = REGEXP_REPLACE( sf_list, 'e', '', 'i') WHERE tag = '100' AND control_set = 1 AND sf_list ILIKE '%e%'; - -UPDATE authority.control_set_authority_field SET sf_list = REGEXP_REPLACE( sf_list, 'e', '', 'i') WHERE tag = '110' AND control_set = 1 AND sf_list ILIKE '%e%'; - -COMMIT;