Increase civicrm_queue_item.data field size
authorOmar abu hussein <opetmar91@gmail.com>
Tue, 20 Apr 2021 11:47:40 +0000 (12:47 +0100)
committerOmar abu hussein <opetmar91@gmail.com>
Tue, 20 Apr 2021 11:48:50 +0000 (12:48 +0100)
civicrm_queue_item.data field holds information about the task in the
job queue that is going to be excuted. But if we are using queues to
import large data (as we might do in an extension such as
nz.co.fuzion.csvimport) then the current field type might not be able to
handle the data size. So here I am changing it from TEXT to LONGTEXT to
accomdate for such cases.

CRM/Queue/DAO/QueueItem.php
xml/schema/Queue/QueueItem.xml

index 7b45686dd5baf5eace27981d5cd7a1ddd4c4e159..53162ce6bd5b7f23d0d28fc068e273db198e1885 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Queue/QueueItem.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:e720570f92fa1a377b108e5fdacf046f)
+ * (GenCodeChecksum:cb6bf44fc806a2a4e88aefe65f7a8fab)
  */
 
 /**
@@ -64,7 +64,7 @@ class CRM_Queue_DAO_QueueItem extends CRM_Core_DAO {
   /**
    * Serialized queue data
    *
-   * @var text
+   * @var longtext
    */
   public $data;
 
@@ -178,7 +178,7 @@ class CRM_Queue_DAO_QueueItem extends CRM_Core_DAO {
         ],
         'data' => [
           'name' => 'data',
-          'type' => CRM_Utils_Type::T_TEXT,
+          'type' => CRM_Utils_Type::T_LONGTEXT,
           'title' => ts('Queue item data'),
           'description' => ts('Serialized queue data'),
           'where' => 'civicrm_queue_item.data',
index 9feedb4f2033bb545af14881e45a5a3c73a6f459..92b35e8cf324f5f32c902092620e11fc4b241079 100644 (file)
@@ -68,7 +68,7 @@
   <field>
     <name>data</name>
     <title>Queue item data</title>
-    <type>text</type>
+    <type>longtext</type>
     <comment>Serialized queue data</comment>
     <serialize>PHP</serialize>
   </field>