From f67308d907646d50935d5f44c6c6e8e95047bb92 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Tue, 16 Aug 2022 20:31:09 +0100 Subject: [PATCH] update schema definition, DAO update and handle upgrade --- CRM/Mailing/DAO/BounceType.php | 4 ++-- CRM/Upgrade/Incremental/sql/5.51.alpha1.mysql.tpl | 1 - CRM/Upgrade/Incremental/sql/5.54.alpha1.mysql.tpl | 1 + xml/schema/Mailing/BounceType.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Mailing/DAO/BounceType.php b/CRM/Mailing/DAO/BounceType.php index 9ce49ab06e..ae5f8c08f9 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(256)) + * (SQL type: varchar(255)) * Note that values will be retrieved from the database as a string. */ public $name; @@ -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' => 256, + 'maxlength' => 255, 'size' => CRM_Utils_Type::MEDIUM, 'where' => 'civicrm_mailing_bounce_type.name', '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 3e753a2be1..3310f3c4cd 100644 --- a/CRM/Upgrade/Incremental/sql/5.51.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/5.51.alpha1.mysql.tpl @@ -1,2 +1 @@ {* 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/CRM/Upgrade/Incremental/sql/5.54.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.54.alpha1.mysql.tpl index 45bf49263d..03d9bcfc39 100644 --- a/CRM/Upgrade/Incremental/sql/5.54.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/5.54.alpha1.mysql.tpl @@ -1 +1,2 @@ {* file to handle db changes in 5.54.alpha1 during upgrade *} +ALTER TABLE `civicrm_mailing_bounce_type` CHANGE `name` `name` VARCHAR(255) 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 6d2f64b583..d414495288 100644 --- a/xml/schema/Mailing/BounceType.xml +++ b/xml/schema/Mailing/BounceType.xml @@ -23,7 +23,7 @@ name Bounce Type Name varchar - 256 + 255 true Type of bounce -- 2.25.1