LP#1096209: add check_sms_notify parameter to all relevant event defs
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Thu, 28 May 2020 16:17:11 +0000 (09:17 -0700)
committerChris Sharp <csharp@georgialibraries.org>
Thu, 24 Sep 2020 17:39:27 +0000 (13:39 -0400)
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/src/sql/Pg/upgrade/XXXX.data.use_check_sms_notify.sql [new file with mode: 0644]

diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.use_check_sms_notify.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.use_check_sms_notify.sql
new file mode 100644 (file)
index 0000000..202d8b1
--- /dev/null
@@ -0,0 +1,15 @@
+BEGIN;
+
+--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO action_trigger.event_params (event_def, param, value)
+SELECT id, 'check_sms_notify', 1
+FROM action_trigger.event_definition
+WHERE reactor = 'SendSMS'
+AND validator IN ('HoldIsAvailable', 'HoldIsCancelled', 'HoldNotifyCheck')
+AND NOT EXISTS (
+    SELECT * FROM action_trigger.event_params
+    WHERE param = 'check_sms_notify'
+);
+
+--COMMIT;