update schema definition, DAO update and handle upgrade
authorKurund Jalmi <kurundjalmi@thirdsectordesign.org>
Wed, 1 Jun 2022 21:57:10 +0000 (22:57 +0100)
committerKurund Jalmi <kurundjalmi@thirdsectordesign.org>
Tue, 16 Aug 2022 19:22:59 +0000 (20:22 +0100)
CRM/Mailing/DAO/BounceType.php
CRM/Upgrade/Incremental/sql/5.51.alpha1.mysql.tpl
xml/schema/Mailing/BounceType.xml

index 4f1c688dd780d134a6044221b8fdf9f2fad095aa..9ce49ab06e36cbc7e7af8a8e5964fa21df42d52d 100644 (file)
@@ -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',
index 3310f3c4cda8836b4065436a69e8e5c233103246..3e753a2be1e8c104f63ff8dee3e0a39dd84fa645 100644 (file)
@@ -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';
index 8e9051f828134b503b318b39977b51475765cfa4..6d2f64b58379aa0158dda6abb32fee7dbcb9d199 100644 (file)
@@ -23,7 +23,7 @@
     <name>name</name>
     <title>Bounce Type Name</title>
     <type>varchar</type>
-    <length>24</length>
+    <length>256</length>
     <required>true</required>
     <comment>Type of bounce</comment>
   </field>
@@ -31,7 +31,7 @@
     <name>description</name>
     <title>Bounce Type Description</title>
     <type>varchar</type>
-    <length>255</length>
+    <length>2048</length>
     <comment>A description of this bounce type</comment>
   </field>
   <field>