Skip to content

Commit

Permalink
refs #39632, gh-111 update blob to text or sync_data
Browse files Browse the repository at this point in the history
  • Loading branch information
jimyhuang committed Jan 19, 2024
1 parent c9f5643 commit 8c2d9d6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions CRM/Contact/DAO/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class CRM_Contact_DAO_Group extends CRM_Core_DAO
/**
* Stores JSON format data from the remote group, such as remote group ID, name, creation time.
*
* @var blob
* @var text
*/
public $sync_data;
/**
Expand Down Expand Up @@ -345,7 +345,7 @@ static function &fields()
) ,
'sync_data' => array(
'name' => 'sync_data',
'type' => CRM_Utils_Type::T_BLOB,
'type' => CRM_Utils_Type::T_TEXT,
'title' => ts('Sync Data') ,
) ,
'last_sync' => array(
Expand Down Expand Up @@ -387,13 +387,13 @@ static function &import($prefix = false)
{
if (!(self::$_import)) {
self::$_import = array();
$fields = & self::fields();
$fields = &self::fields();
foreach($fields as $name => $field) {
if (CRM_Utils_Array::value('import', $field)) {
if ($prefix) {
self::$_import['group'] = & $fields[$name];
self::$_import['group'] = &$fields[$name];
} else {
self::$_import[$name] = & $fields[$name];
self::$_import[$name] = &$fields[$name];
}
}
}
Expand All @@ -410,13 +410,13 @@ static function &export($prefix = false)
{
if (!(self::$_export)) {
self::$_export = array();
$fields = & self::fields();
$fields = &self::fields();
foreach($fields as $name => $field) {
if (CRM_Utils_Array::value('export', $field)) {
if ($prefix) {
self::$_export['group'] = & $fields[$name];
self::$_export['group'] = &$fields[$name];
} else {
self::$_export[$name] = & $fields[$name];
self::$_export[$name] = &$fields[$name];
}
}
}
Expand Down Expand Up @@ -464,7 +464,7 @@ static function tsEnum($field, $value)
*/
static function addDisplayEnums(&$values)
{
$enumFields = & CRM_Contact_DAO_Group::getEnums();
$enumFields = &CRM_Contact_DAO_Group::getEnums();
foreach($enumFields as $enum) {
if (isset($values[$enum])) {
$values[$enum . '_display'] = CRM_Contact_DAO_Group::tsEnum($enum, $values[$enum]);
Expand Down
2 changes: 1 addition & 1 deletion sql/civicrm.mysql
Original file line number Diff line number Diff line change
Expand Up @@ -3297,7 +3297,7 @@ CREATE TABLE civicrm_group (
children text COMMENT 'IDs of the child(ren)',
is_hidden tinyint DEFAULT 0 COMMENT 'Is this group hidden?',
is_sync tinyint COMMENT 'Indicates whether the group is synchronized.',
sync_data blob COMMENT 'Stores JSON format data from the remote group, such as remote group ID, name, creation time.',
sync_data text COMMENT 'Stores JSON format data from the remote group, such as remote group ID, name, creation time.',
last_sync datetime COMMENT 'Stores the last sync time with the remote group.'
,
PRIMARY KEY ( id )
Expand Down
2 changes: 1 addition & 1 deletion xml/schema/Contact/Group.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
</field>
<field>
<name>sync_data</name>
<type>blob</type>
<type>text</type>
<comment>Stores JSON format data from the remote group, such as remote group ID, name, creation time.</comment>
<add>4.0</add>
</field>
Expand Down

0 comments on commit 8c2d9d6

Please sign in to comment.