From: eileen Date: Fri, 13 Apr 2018 02:52:09 +0000 (+1200) Subject: CRM-19885 / dev/core/issues/36 fix fatal error on scheduled reminders due to no default X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=055c5fe63bc979e71cae06db51113a66148d0399;p=civicrm-core.git CRM-19885 / dev/core/issues/36 fix fatal error on scheduled reminders due to no default --- diff --git a/CRM/Upgrade/Incremental/sql/5.2.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.2.alpha1.mysql.tpl index bf706f18e3..4042e8e434 100644 --- a/CRM/Upgrade/Incremental/sql/5.2.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/5.2.alpha1.mysql.tpl @@ -1 +1,10 @@ {* file to handle db changes in 5.2.alpha1 during upgrade *} +# CRM-19885 & https://lab.civicrm.org/dev/core/issues/36#note_3509 +UPDATE civicrm_action_schedule SET repetition_frequency_interval = 0 WHERE repetition_frequency_interval IS NULL; +UPDATE civicrm_action_schedule SET start_action_offset = 0 WHERE start_action_offset IS NULL; +UPDATE civicrm_action_schedule SET end_frequency_interval = 0 WHERE end_frequency_interval IS NULL; + +ALTER TABLE civicrm_action_schedule +ALTER column repetition_frequency_interval SET DEFAULT 0, +ALTER column start_action_offset SET DEFAULT 0, +ALTER column end_frequency_interval SET DEFAULT 0; diff --git a/xml/schema/Core/ActionSchedule.xml b/xml/schema/Core/ActionSchedule.xml index 98d8c55dcb..4c7d78c219 100644 --- a/xml/schema/Core/ActionSchedule.xml +++ b/xml/schema/Core/ActionSchedule.xml @@ -64,6 +64,7 @@ start_action_offset int unsigned Reminder Interval. + 0 3.4 @@ -116,6 +117,7 @@ repetition_frequency_interval int unsigned + 0 Time interval for repeating the reminder. 3.4 @@ -137,6 +139,7 @@ int unsigned Time interval till repeating the reminder. 3.4 + 0 end_action