*
* Generated from xml/schema/CRM/Contact/SavedSearch.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d2d8b39f5f8869d8c5295810f8f2ad78)
+ * (GenCodeChecksum:a60876bf99e330f6a463247686a92f31)
*/
/**
*/
public $search_custom_id;
+ /**
+ * Entity name for API based search
+ *
+ * @var string
+ */
+ public $api_entity;
+
+ /**
+ * Parameters for API based search
+ *
+ * @var text
+ */
+ public $api_params;
+
/**
* Class constructor.
*/
'bao' => 'CRM_Contact_BAO_SavedSearch',
'localizable' => 0,
],
+ 'api_entity' => [
+ 'name' => 'api_entity',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Name'),
+ 'description' => ts('Entity name for API based search'),
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'where' => 'civicrm_saved_search.api_entity',
+ 'table_name' => 'civicrm_saved_search',
+ 'entity' => 'SavedSearch',
+ 'bao' => 'CRM_Contact_BAO_SavedSearch',
+ 'localizable' => 0,
+ ],
+ 'api_params' => [
+ 'name' => 'api_params',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('API Parameters'),
+ 'description' => ts('Parameters for API based search'),
+ 'where' => 'civicrm_saved_search.api_params',
+ 'table_name' => 'civicrm_saved_search',
+ 'entity' => 'SavedSearch',
+ 'bao' => 'CRM_Contact_BAO_SavedSearch',
+ 'localizable' => 0,
+ 'serialize' => self::SERIALIZE_JSON,
+ ],
];
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
// }
}
- /*
- * Important! All upgrade functions MUST add a 'runSql' task.
- * Uncomment and use the following template for a new upgrade version
- * (change the x in the function name):
- */
-
/**
* Upgrade function.
*
$this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
$this->addTask('Install sequential creditnote extension', 'installCreditNotes');
$this->addTask('Drop obsolete columns from saved_search table', 'dropSavedSearchColumns');
+ $this->addTask('Smart groups: Add api_entity column to civicrm_saved_search', 'addColumn',
+ 'civicrm_saved_search', 'api_entity', "varchar(255) DEFAULT NULL COMMENT 'Entity name for API based search'"
+ );
+ $this->addTask('Smart groups: Add api_params column to civicrm_saved_search', 'addColumn',
+ 'civicrm_saved_search', 'api_params', "text DEFAULT NULL COMMENT 'Parameters for API based search'"
+ );
}
/**
<add>1.6</add>
<drop>5.24</drop>
</field>
+ <field>
+ <name>api_entity</name>
+ <type>varchar</type>
+ <title>Entity Name</title>
+ <length>255</length>
+ <comment>Entity name for API based search</comment>
+ <add>5.24</add>
+ </field>
+ <field>
+ <name>api_params</name>
+ <type>text</type>
+ <title>API Parameters</title>
+ <comment>Parameters for API based search</comment>
+ <serialize>JSON</serialize>
+ <add>5.24</add>
+ </field>
</table>