Skip to content

Commit

Permalink
ScheduledCommunications - Increase length of fields used by SearchKit…
Browse files Browse the repository at this point in the history
… for communications

Fixes dev/core#5725
  • Loading branch information
colemanw committed Feb 11, 2025
1 parent edad0b5 commit fca3de8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
30 changes: 30 additions & 0 deletions CRM/Upgrade/Incremental/php/SixOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,36 @@ class CRM_Upgrade_Incremental_php_SixOne extends CRM_Upgrade_Incremental_Base {
*/
public function upgrade_6_1_alpha1($rev): void {
$this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
$this->addTask('Increase field length of civicrm_action_schedule.entity_status', 'alterSchemaField', 'ActionSchedule', 'entity_status', [
'title' => ts('Entity Status'),
'sql_type' => 'varchar(255)',
'input_type' => 'Select',
'description' => ts('Entity status'),
'add' => '3.4',
'serialize' => CRM_Core_DAO::SERIALIZE_SEPARATOR_TRIMMED,
'input_attrs' => [
'label' => ts('Entity Status'),
'multiple' => '1',
'control_field' => 'entity_value',
],
'pseudoconstant' => [
'callback' => ['CRM_Core_BAO_ActionSchedule', 'getEntityStatusOptions'],
],
]);
$this->addTask('Increase field length of civicrm_action_schedule.start_action_date', 'alterSchemaField', 'ActionSchedule', 'start_action_date', [
'title' => ts('Start Action Date'),
'sql_type' => 'varchar(255)',
'input_type' => 'Select',
'description' => ts('Entity date'),
'add' => '3.4',
'input_attrs' => [
'label' => ts('Start Date'),
'control_field' => 'entity_value',
],
'pseudoconstant' => [
'callback' => ['CRM_Core_BAO_ActionSchedule', 'getActionDateOptions'],
],
]);
}

}
4 changes: 2 additions & 2 deletions schema/Core/ActionSchedule.entityType.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
],
'entity_status' => [
'title' => ts('Entity Status'),
'sql_type' => 'varchar(64)',
'sql_type' => 'varchar(255)',
'input_type' => 'Select',
'description' => ts('Entity status'),
'add' => '3.4',
Expand Down Expand Up @@ -152,7 +152,7 @@
],
'start_action_date' => [
'title' => ts('Start Action Date'),
'sql_type' => 'varchar(64)',
'sql_type' => 'varchar(255)',
'input_type' => 'Select',
'description' => ts('Entity date'),
'add' => '3.4',
Expand Down

0 comments on commit fca3de8

Please sign in to comment.