From ee605a6e234ca502be8e071b86fd097b9a6fdefd Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Wed, 1 Jun 2022 22:57:10 +0100 Subject: [PATCH] update schema definition, DAO update and handle upgrade --- CRM/Mailing/DAO/BounceType.php | 8 ++++---- CRM/Upgrade/Incremental/sql/5.51.alpha1.mysql.tpl | 1 + xml/schema/Mailing/BounceType.xml | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CRM/Mailing/DAO/BounceType.php b/CRM/Mailing/DAO/BounceType.php index 4f1c688dd7..9ce49ab06e 100644 --- a/CRM/Mailing/DAO/BounceType.php +++ b/CRM/Mailing/DAO/BounceType.php @@ -42,7 +42,7 @@ class CRM_Mailing_DAO_BounceType extends CRM_Core_DAO { * Type of bounce * * @var string - * (SQL type: varchar(24)) + * (SQL type: varchar(256)) * Note that values will be retrieved from the database as a string. */ public $name; @@ -51,7 +51,7 @@ class CRM_Mailing_DAO_BounceType extends CRM_Core_DAO { * A description of this bounce type * * @var string|null - * (SQL type: varchar(255)) + * (SQL type: varchar(2048)) * Note that values will be retrieved from the database as a string. */ public $description; @@ -113,7 +113,7 @@ class CRM_Mailing_DAO_BounceType extends CRM_Core_DAO { 'title' => ts('Bounce Type Name'), 'description' => ts('Type of bounce'), 'required' => TRUE, - 'maxlength' => 24, + 'maxlength' => 256, 'size' => CRM_Utils_Type::MEDIUM, 'where' => 'civicrm_mailing_bounce_type.name', 'table_name' => 'civicrm_mailing_bounce_type', @@ -127,7 +127,7 @@ class CRM_Mailing_DAO_BounceType extends CRM_Core_DAO { 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Bounce Type Description'), 'description' => ts('A description of this bounce type'), - 'maxlength' => 255, + 'maxlength' => 2048, 'size' => CRM_Utils_Type::HUGE, 'where' => 'civicrm_mailing_bounce_type.description', 'table_name' => 'civicrm_mailing_bounce_type', diff --git a/CRM/Upgrade/Incremental/sql/5.51.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.51.alpha1.mysql.tpl index 3310f3c4cd..3e753a2be1 100644 --- a/CRM/Upgrade/Incremental/sql/5.51.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/5.51.alpha1.mysql.tpl @@ -1 +1,2 @@ {* file to handle db changes in 5.51.alpha1 during upgrade *} +ALTER TABLE `civicrm_mailing_bounce_type` CHANGE `name` `name` VARCHAR(256) NOT NULL COMMENT 'Type of bounce', CHANGE `description` `description` VARCHAR(2048) NULL DEFAULT NULL COMMENT 'A description of this bounce type'; diff --git a/xml/schema/Mailing/BounceType.xml b/xml/schema/Mailing/BounceType.xml index 8e9051f828..6d2f64b583 100644 --- a/xml/schema/Mailing/BounceType.xml +++ b/xml/schema/Mailing/BounceType.xml @@ -23,7 +23,7 @@ name Bounce Type Name varchar - 24 + 256 true Type of bounce @@ -31,7 +31,7 @@ description Bounce Type Description varchar - 255 + 2048 A description of this bounce type -- 2.25.1