lp1856097 stamp and small fixes to upgrade script
authorJane Sandberg <js7389@princeton.edu>
Fri, 4 Nov 2022 03:00:11 +0000 (20:00 -0700)
committerJane Sandberg <js7389@princeton.edu>
Fri, 4 Nov 2022 03:00:14 +0000 (20:00 -0700)
Don't apply the upgrade if it would overwrite existing customizations
to the description, also add a missing semicolon.

Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/1353.data.default_classification-description-update.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.data.default_classification-description-update.sql [deleted file]

index db4bfb7..0643d46 100644 (file)
@@ -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/1353.data.default_classification-description-update.sql b/Open-ILS/src/sql/Pg/upgrade/1353.data.default_classification-description-update.sql
new file mode 100644 (file)
index 0000000..3763a0a
--- /dev/null
@@ -0,0 +1,12 @@
+BEGIN;
+
+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')
+    WHERE name = 'cat.default_classification_scheme'
+    AND description =
+        'Defines the default classification scheme for new call numbers: 1 = Generic; 2 = Dewey; 3 = LC';
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.default_classification-description-update.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.default_classification-description-update.sql
deleted file mode 100644 (file)
index cf3e907..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('XXXX', :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')
-    WHERE name = 'cat.default_classification_scheme'
-
-COMMIT;
\ No newline at end of file