LP#1915219: stamp schema update
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 4 Mar 2021 16:09:11 +0000 (11:09 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 4 Mar 2021 16:09:11 +0000 (11:09 -0500)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/sql/Pg/upgrade/1249.data.overdue-email-opt-in-setting.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.data.overdue-email-opt-in-setting.sql [deleted file]

index 2fa3ff4..958d0a9 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 ('1248', :eg_version); -- JBoyer / Dyrcona
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1249', :eg_version); -- jeffdavis/gcollum/gmcharlt
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/1249.data.overdue-email-opt-in-setting.sql b/Open-ILS/src/sql/Pg/upgrade/1249.data.overdue-email-opt-in-setting.sql
new file mode 100644 (file)
index 0000000..90f83d9
--- /dev/null
@@ -0,0 +1,62 @@
+SELECT evergreen.upgrade_deps_block_check('1249', :eg_version);
+INSERT INTO config.usr_setting_type (
+    name,
+    opac_visible,
+    label,
+    description,
+    datatype,
+    reg_default
+    'circ.default_overdue_notices_enabled',
+    TRUE,
+    oils_i18n_gettext(
+        'circ.default_overdue_notices_enabled',
+        'Receive Overdue and Courtesy Emails',
+        'cust',
+        'label'
+    ),
+    oils_i18n_gettext(
+        'circ.default_overdue_notices_enabled',
+        'Receive overdue and predue email notifications',
+        'cust',
+        'description'
+    ),
+    'bool',
+    'true'
+\qecho The following query will set the circ.default_overdue_notices_enabled
+\qecho user setting to true (the default value) for all existing users,
+\qecho ensuring they continue to receive overdue/predue emails.
+\qecho     INSERT INTO actor.usr_setting (usr, name, value)
+\qecho     SELECT
+\qecho         id,
+\qecho         'circ.default_overdue_notices_enabled',
+\qecho         'true'
+\qecho     FROM actor.usr;
+\qecho The following query will add the circ.default_overdue_notices_enabled
+\qecho user setting as an opt-in setting for all action triggers that send
+\qecho emails based on a circ being due (unless another opt-in setting is
+\qecho already in use).
+\qecho     UPDATE action_trigger.event_definition
+\qecho     SET opt_in_setting = 'circ.default_overdue_notices_enabled',
+\qecho         usr_field = 'usr'
+\qecho     WHERE opt_in_setting IS NULL
+\qecho         AND hook = 'checkout.due'
+\qecho         AND reactor = 'SendEmail';
+\qecho Evergreen admins who wish to use the new setting should run both of
+\qecho the above queries.  Admins who do not wish to use it, or who are
+\qecho already using a custom opt-in setting of their own, do not need to
+\qecho do anything.
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.overdue-email-opt-in-setting.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.overdue-email-opt-in-setting.sql
deleted file mode 100644 (file)
index daf548e..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-INSERT INTO config.usr_setting_type (
-    name,
-    opac_visible,
-    label,
-    description,
-    datatype,
-    reg_default
-    'circ.default_overdue_notices_enabled',
-    TRUE,
-    oils_i18n_gettext(
-        'circ.default_overdue_notices_enabled',
-        'Receive Overdue and Courtesy Emails',
-        'cust',
-        'label'
-    ),
-    oils_i18n_gettext(
-        'circ.default_overdue_notices_enabled',
-        'Receive overdue and predue email notifications',
-        'cust',
-        'description'
-    ),
-    'bool',
-    'true'
-\qecho The following query will set the circ.default_overdue_notices_enabled
-\qecho user setting to true (the default value) for all existing users,
-\qecho ensuring they continue to receive overdue/predue emails.
-\qecho     INSERT INTO actor.usr_setting (usr, name, value)
-\qecho     SELECT
-\qecho         id,
-\qecho         'circ.default_overdue_notices_enabled',
-\qecho         'true'
-\qecho     FROM actor.usr;
-\qecho The following query will add the circ.default_overdue_notices_enabled
-\qecho user setting as an opt-in setting for all action triggers that send
-\qecho emails based on a circ being due (unless another opt-in setting is
-\qecho already in use).
-\qecho     UPDATE action_trigger.event_definition
-\qecho     SET opt_in_setting = 'circ.default_overdue_notices_enabled',
-\qecho         usr_field = 'usr'
-\qecho     WHERE opt_in_setting IS NULL
-\qecho         AND hook = 'checkout.due'
-\qecho         AND reactor = 'SendEmail';
-\qecho Evergreen admins who wish to use the new setting should run both of
-\qecho the above queries.  Admins who do not wish to use it, or who are
-\qecho already using a custom opt-in setting of their own, do not need to
-\qecho do anything.