Stamped upgrade script for hold_notification update via A/T cleanup module
authorMike Rylander <mrylander@gmail.com>
Tue, 15 Nov 2011 17:18:53 +0000 (12:18 -0500)
committerMike Rylander <mrylander@gmail.com>
Tue, 15 Nov 2011 17:18:53 +0000 (12:18 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0647.data.hold-notification-cleanup-mod.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold-notification-cleanup-mod.sql [deleted file]

index 6cac923..2a45321 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 ('0646', :eg_version); -- jamesrf/senator
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0647', :eg_version); -- berick/miker
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0647.data.hold-notification-cleanup-mod.sql b/Open-ILS/src/sql/Pg/upgrade/0647.data.hold-notification-cleanup-mod.sql
new file mode 100644 (file)
index 0000000..2578ccb
--- /dev/null
@@ -0,0 +1,24 @@
+-- Evergreen DB patch XXXX.data.hold-notification-cleanup-mod.sql
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0647', :eg_version);
+
+INSERT INTO action_trigger.cleanup ( module, description ) VALUES (
+    'CreateHoldNotification',
+    oils_i18n_gettext(
+        'CreateHoldNotification',
+        'Creates a hold_notification record for each notified hold',
+        'atclean',
+        'description'
+    )
+);
+
+UPDATE action_trigger.event_definition 
+    SET 
+        cleanup_success = 'CreateHoldNotification' 
+    WHERE 
+        id = 5 -- stock hold-ready email event_def
+        AND cleanup_success IS NULL; -- don't clobber any existing cleanup mod
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold-notification-cleanup-mod.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold-notification-cleanup-mod.sql
deleted file mode 100644 (file)
index 40da866..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
--- Evergreen DB patch XXXX.data.hold-notification-cleanup-mod.sql
-BEGIN;
-
--- check whether patch can be applied
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-INSERT INTO action_trigger.cleanup ( module, description ) VALUES (
-    'CreateHoldNotification',
-    oils_i18n_gettext(
-        'CreateHoldNotification',
-        'Creates a hold_notification record for each notified hold',
-        'atclean',
-        'description'
-    )
-);
-
-UPDATE action_trigger.event_definition 
-    SET 
-        cleanup_success = 'CreateHoldNotification' 
-    WHERE 
-        id = 5 -- stock hold-ready email event_def
-        AND cleanup_success IS NULL; -- don't clobber any existing cleanup mod
-
-COMMIT;