CRM-19885 / dev/core/issues/36 fix fatal error on scheduled reminders due to no default
authoreileen <emcnaughton@wikimedia.org>
Fri, 13 Apr 2018 02:52:09 +0000 (14:52 +1200)
committereileen <emcnaughton@wikimedia.org>
Thu, 19 Apr 2018 23:24:28 +0000 (11:24 +1200)
CRM/Upgrade/Incremental/sql/5.2.alpha1.mysql.tpl
xml/schema/Core/ActionSchedule.xml

index bf706f18e386137eb7aa7e663ec9ec77055e70ad..4042e8e434c5e5beed05095e20f1ae7bc65d1381 100644 (file)
@@ -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;
index 98d8c55dcb9dde6161ce88cbef183139c8fad343..4c7d78c219bf52e993cba838450bc3b81ef53c36 100644 (file)
@@ -64,6 +64,7 @@
     <name>start_action_offset</name>
     <type>int unsigned</type>
     <comment>Reminder Interval.</comment>
+    <default>0</default>
     <add>3.4</add>
   </field>
   <field>
   <field>
     <name>repetition_frequency_interval</name>
     <type>int unsigned</type>
+    <default>0</default>
     <comment>Time interval for repeating the reminder.</comment>
     <add>3.4</add>
   </field>
     <type>int unsigned</type>
     <comment>Time interval till repeating the reminder.</comment>
     <add>3.4</add>
+    <default>0</default>
   </field>
   <field>
     <name>end_action</name>