From: Mike Rylander Date: Tue, 15 Nov 2011 17:18:53 +0000 (-0500) Subject: Stamped upgrade script for hold_notification update via A/T cleanup module X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ffcf0428e6c57d7c3e075094caae3a62305c1f32;p=evergreen%2Fpines.git Stamped upgrade script for hold_notification update via A/T cleanup module Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 6cac923bda..2a45321d3b 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -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 index 0000000000..2578ccbda1 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0647.data.hold-notification-cleanup-mod.sql @@ -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 index 40da866b55..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold-notification-cleanup-mod.sql +++ /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;