*
* Generated from xml/schema/CRM/Core/ActionSchedule.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:444acdd7b222ed9f593b0b84aebfb763)
+ * (GenCodeChecksum:79492485b0099dc4a6a101f3191d64dd)
*/
/**
/**
* Is this the recipient criteria limited to OR in addition to?
*
- * @var bool|string
+ * @var bool|string|null
* (SQL type: tinyint)
* Note that values will be retrieved from the database as a string.
*/
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Limit To'),
'description' => ts('Is this the recipient criteria limited to OR in addition to?'),
- 'required' => TRUE,
'where' => 'civicrm_action_schedule.limit_to',
- 'default' => '1',
'table_name' => 'civicrm_action_schedule',
'entity' => 'ActionSchedule',
'bao' => 'CRM_Core_BAO_ActionSchedule',
}
}
+ /**
+ * Upgrade function.
+ *
+ * @param string $rev
+ */
+ public function upgrade_5_49_2($rev) {
+ $this->addtask('Revert civicrm_action_schedule.limit_to to be NULL', 'changeBooleanColumnLimitTo');
+ }
+
+ /**
+ * Revert boolean default civicrm_action_schedule.limit_to to be NULL
+ */
+ public static function changeBooleanColumnLimitTo() {
+ CRM_Core_DAO::executeQuery("ALTER TABLE `civicrm_action_schedule` CHANGE `limit_to` `limit_to` tinyint NULL COMMENT 'Is this the recipient criteria limited to OR in addition to?'", [], TRUE, NULL, FALSE, FALSE);
+ CRM_Core_DAO::executeQuery("UPDATE `civicrm_action_schedule` SET `limit_to` = NULL WHERE `group_id` IS NULL AND recipient_manual IS NULL", [], TRUE, NULL, FALSE, FALSE);
+ return TRUE;
+ }
+
/**
* Converts a boolean table column to be NOT NULL
* @param CRM_Queue_TaskContext $ctx
<?php
return [
'civicrm_action_schedule' => [
- 'limit_to' => "DEFAULT 1 COMMENT 'Is this the recipient criteria limited to OR in addition to?'",
'is_repeat' => "DEFAULT 0",
'is_active' => "DEFAULT 1 COMMENT 'Is this option active?'",
'record_activity' => "DEFAULT 0 COMMENT 'Record Activity for this reminder?'",
<html>
<label>Limit To</label>
</html>
- <default>1</default>
- <required>true</required>
<add>4.4</add>
</field>
<field>