stamped upgrade for hold-avail-email-notify validation
authorBill Erickson <berick@esilibrary.com>
Thu, 15 Mar 2012 16:06:48 +0000 (12:06 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 15 Mar 2012 16:06:48 +0000 (12:06 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0683.hold_available_email_notify.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.hold_available_email_notify.sql [deleted file]

index 38966f2..6c5851f 100644 (file)
@@ -86,7 +86,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 ('0682', :eg_version); -- berick/dbs/tsbere
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0683', :eg_version); -- tsbere/berick
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0683.hold_available_email_notify.sql b/Open-ILS/src/sql/Pg/upgrade/0683.hold_available_email_notify.sql
new file mode 100644 (file)
index 0000000..2765f4e
--- /dev/null
@@ -0,0 +1,29 @@
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0683', :eg_version);
+
+INSERT INTO action_trigger.event_params (event_def, param, value)
+    VALUES (5, 'check_email_notify', 1);
+INSERT INTO action_trigger.event_params (event_def, param, value)
+    VALUES (7, 'check_email_notify', 1);
+INSERT INTO action_trigger.event_params (event_def, param, value)
+    VALUES (9, 'check_email_notify', 1);
+INSERT INTO action_trigger.validator (module,description) VALUES
+    ('HoldNotifyCheck',
+    oils_i18n_gettext(
+        'HoldNotifyCheck',
+        'Check Hold notification flag(s)',
+        'atval',
+        'description'
+    ));
+UPDATE action_trigger.event_definition SET validator = 'HoldNotifyCheck' WHERE id = 9;
+
+-- NOT COVERED: Adding check_sms_notify to the proper trigger. It doesn't have a static id.
+
+COMMIT;
+
+--UNDO
+--UPDATE action_trigger.event_definition SET validator = 'NOOP_True' WHERE id = 9;
+--DELETE FROM action_trigger.event_params WHERE param = 'check_email_notify';
+--DELETE FROM action_trigger.validator WHERE module = 'HoldNotifyCheck';
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.hold_available_email_notify.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.hold_available_email_notify.sql
deleted file mode 100644 (file)
index a0ab077..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-INSERT INTO action_trigger.event_params (event_def, param, value)
-    VALUES (5, 'check_email_notify', 1);
-INSERT INTO action_trigger.event_params (event_def, param, value)
-    VALUES (7, 'check_email_notify', 1);
-INSERT INTO action_trigger.event_params (event_def, param, value)
-    VALUES (9, 'check_email_notify', 1);
-INSERT INTO action_trigger.validator (module,description) VALUES
-    ('HoldNotifyCheck',
-    oils_i18n_gettext(
-        'HoldNotifyCheck',
-        'Check Hold notification flag(s)',
-        'atval',
-        'description'
-    ));
-UPDATE action_trigger.event_definition SET validator = 'HoldNotifyCheck' WHERE id = 9;
-
--- NOT COVERED: Adding check_sms_notify to the proper trigger. It doesn't have a static id.
-
---UNDO
---UPDATE action_trigger.event_definition SET validator = 'NOOP_True' WHERE id = 9;
---DELETE FROM action_trigger.event_params WHERE param = 'check_email_notify';
---DELETE FROM action_trigger.validator WHERE module = 'HoldNotifyCheck';