LP#1096209: Stamp upgrade script
authorChris Sharp <csharp@georgialibraries.org>
Thu, 24 Sep 2020 17:41:20 +0000 (13:41 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Thu, 24 Sep 2020 17:41:20 +0000 (13:41 -0400)
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/1240.data.use_check_sms_notify.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.data.use_check_sms_notify.sql [deleted file]

index 40fda64..6cf8a13 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 ('1239', :eg_version); -- sandbergja/csharp
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1240', :eg_version); -- jeffdavis/csharp
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/1240.data.use_check_sms_notify.sql b/Open-ILS/src/sql/Pg/upgrade/1240.data.use_check_sms_notify.sql
new file mode 100644 (file)
index 0000000..8cd8c69
--- /dev/null
@@ -0,0 +1,15 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1240', :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;
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
deleted file mode 100644 (file)
index 202d8b1..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-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;