Skip to content

Commit

Permalink
Merge pull request #32054 from colemanw/alterActionScheduleLength
Browse files Browse the repository at this point in the history
dev/core#5725 ScheduledCommunications - Increase length of fields used by SearchKit
  • Loading branch information
eileenmcnaughton authored Feb 12, 2025
2 parents d9f2162 + 4040cc6 commit d8b9e2d
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/SixZero.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,36 @@ public function upgrade_6_0_alpha1($rev): void {
);
$this->addTask('Set a default activity priority', 'addActivityPriorityDefault');
$this->addSimpleExtensionTask('Enable dedupe backward compatibility', ['legacydedupefinder']);
$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(2048)',
'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'],
],
]);
}

public static function migrateFromEmailAddressValues($rev): bool {
Expand Down
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(2048)',
'input_type' => 'Select',
'description' => ts('Entity date'),
'add' => '3.4',
Expand Down

0 comments on commit d8b9e2d

Please sign in to comment.