From 2e1ae9e2e72373af1b917709b12731461ce965eb Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Thu, 3 Nov 2022 20:00:11 -0700 Subject: [PATCH] lp1856097 stamp and small fixes to upgrade script Don't apply the upgrade if it would overwrite existing customizations to the description, also add a missing semicolon. Signed-off-by: Jane Sandberg --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- ...ql => 1353.data.default_classification-description-update.sql} | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) rename Open-ILS/src/sql/Pg/upgrade/{XXXX.data.default_classification-description-update.sql => 1353.data.default_classification-description-update.sql} (51%) diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index db4bfb78d4..0643d46203 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 ('1352', :eg_version); -- berick/sandbergja/mmorgan +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1353', :eg_version); -- khuckins/smorrison/sandbergja CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.default_classification-description-update.sql b/Open-ILS/src/sql/Pg/upgrade/1353.data.default_classification-description-update.sql similarity index 51% rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.default_classification-description-update.sql rename to Open-ILS/src/sql/Pg/upgrade/1353.data.default_classification-description-update.sql index cf3e907704..3763a0a39a 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.default_classification-description-update.sql +++ b/Open-ILS/src/sql/Pg/upgrade/1353.data.default_classification-description-update.sql @@ -1,10 +1,12 @@ BEGIN; -SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); +SELECT evergreen.upgrade_deps_block_check('1353', :eg_version); UPDATE config.org_unit_setting_type SET description = oils_i18n_gettext('cat.default_classification_scheme', 'Defines the default classification scheme for new call numbers.', - 'coust', 'description') + 'coust', 'description') WHERE name = 'cat.default_classification_scheme' + AND description = + 'Defines the default classification scheme for new call numbers: 1 = Generic; 2 = Dewey; 3 = LC'; -COMMIT; \ No newline at end of file +COMMIT; -- 2.11.0