LP#1096209: Stamp upgrade script
[Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 1240.data.use_check_sms_notify.sql
1 BEGIN;
2
3 SELECT evergreen.upgrade_deps_block_check('1240', :eg_version);
4
5 INSERT INTO action_trigger.event_params (event_def, param, value)
6 SELECT id, 'check_sms_notify', 1
7 FROM action_trigger.event_definition
8 WHERE reactor = 'SendSMS'
9 AND validator IN ('HoldIsAvailable', 'HoldIsCancelled', 'HoldNotifyCheck')
10 AND NOT EXISTS (
11     SELECT * FROM action_trigger.event_params
12     WHERE param = 'check_sms_notify'
13 );
14
15 COMMIT;