From 64745f605eab7d68babc208f1990e64f4a4f59c6 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 14 Apr 2022 15:46:02 +1200 Subject: [PATCH] Move 5.49 update to beta --- CRM/Upgrade/Incremental/php/FiveFortyNine.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/CRM/Upgrade/Incremental/php/FiveFortyNine.php b/CRM/Upgrade/Incremental/php/FiveFortyNine.php index 5d55e58fee..e6d0ec2d34 100644 --- a/CRM/Upgrade/Incremental/php/FiveFortyNine.php +++ b/CRM/Upgrade/Incremental/php/FiveFortyNine.php @@ -41,14 +41,23 @@ class CRM_Upgrade_Incremental_php_FiveFortyNine extends CRM_Upgrade_Incremental_ 'civicrm_contact_type', 'icon', "varchar(255) DEFAULT NULL COMMENT 'crm-i icon class representing this contact type'" ); $this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev); + $this->addTask('Add civicrm_option_group.option_value_fields column', 'addColumn', + 'civicrm_option_group', 'option_value_fields', "varchar(128) DEFAULT \"name,label,description\" COMMENT 'Which optional columns from the option_value table are in use by this group.'"); + $this->addTask('Populate civicrm_option_group.option_value_fields column', 'fillOptionValueFields'); + } + + /** + * Upgrade step; adds tasks including 'runSql'. + * + * @param string $rev + * The version number matching this function name + */ + public function upgrade_5_49_beta1($rev): void { foreach (static::findBooleanColumns() as $tableName => $columns) { foreach ($columns as $columnName => $defn) { $this->addTask("Update $tableName.$columnName to be NOT NULL", 'changeBooleanColumn', $tableName, $columnName, $defn); } } - $this->addTask('Add civicrm_option_group.option_value_fields column', 'addColumn', - 'civicrm_option_group', 'option_value_fields', "varchar(128) DEFAULT \"name,label,description\" COMMENT 'Which optional columns from the option_value table are in use by this group.'"); - $this->addTask('Populate civicrm_option_group.option_value_fields column', 'fillOptionValueFields'); } /** -- 2.25.1