Commit 3ed77291 authored by totten's avatar totten

CRM-20958 - Declare created/modified timestamps for case+activity

parent ff8784d5
......@@ -30,7 +30,7 @@
*
* Generated from xml/schema/CRM/Activity/Activity.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:a530f1fb1a27c5a15b5d138732b4c581)
* (GenCodeChecksum:dfa63754ef6ea1a9c7148e735dd6ff8a)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
......@@ -195,6 +195,18 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
* @var boolean
*/
public $is_star;
/**
* When was the activity was created.
*
* @var timestamp
*/
public $created_date;
/**
* When was the activity (or closely related entity) was created or modified or deleted.
*
* @var timestamp
*/
public $modified_date;
/**
* Class constructor.
*/
......@@ -642,6 +654,38 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
'bao' => 'CRM_Activity_BAO_Activity',
'localizable' => 0,
) ,
'activity_created_date' => array(
'name' => 'created_date',
'type' => CRM_Utils_Type::T_TIMESTAMP,
'title' => ts('Created Date') ,
'description' => 'When was the activity was created.',
'required' => false,
'export' => true,
'where' => 'civicrm_activity.created_date',
'headerPattern' => '',
'dataPattern' => '',
'default' => 'NULL',
'table_name' => 'civicrm_activity',
'entity' => 'Activity',
'bao' => 'CRM_Activity_BAO_Activity',
'localizable' => 0,
) ,
'activity_modified_date' => array(
'name' => 'modified_date',
'type' => CRM_Utils_Type::T_TIMESTAMP,
'title' => ts('Modified Date') ,
'description' => 'When was the activity (or closely related entity) was created or modified or deleted.',
'required' => false,
'export' => true,
'where' => 'civicrm_activity.modified_date',
'headerPattern' => '',
'dataPattern' => '',
'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
'table_name' => 'civicrm_activity',
'entity' => 'Activity',
'bao' => 'CRM_Activity_BAO_Activity',
'localizable' => 0,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
......
......@@ -30,7 +30,7 @@
*
* Generated from xml/schema/CRM/Case/Case.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:e45e7e2a53a945c4659cf393410a9d7a)
* (GenCodeChecksum:2a046fd795b19790f45c5d9dde06a538)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
......@@ -97,6 +97,18 @@ class CRM_Case_DAO_Case extends CRM_Core_DAO {
* @var boolean
*/
public $is_deleted;
/**
* When was the case was created.
*
* @var timestamp
*/
public $created_date;
/**
* When was the case (or closely related entity) was created or modified or deleted.
*
* @var timestamp
*/
public $modified_date;
/**
* Class constructor.
*/
......@@ -275,6 +287,38 @@ class CRM_Case_DAO_Case extends CRM_Core_DAO {
'bao' => 'CRM_Case_BAO_Case',
'localizable' => 0,
) ,
'case_created_date' => array(
'name' => 'created_date',
'type' => CRM_Utils_Type::T_TIMESTAMP,
'title' => ts('Created Date') ,
'description' => 'When was the case was created.',
'required' => false,
'export' => true,
'where' => 'civicrm_case.created_date',
'headerPattern' => '',
'dataPattern' => '',
'default' => 'NULL',
'table_name' => 'civicrm_case',
'entity' => 'Case',
'bao' => 'CRM_Case_BAO_Case',
'localizable' => 0,
) ,
'case_modified_date' => array(
'name' => 'modified_date',
'type' => CRM_Utils_Type::T_TIMESTAMP,
'title' => ts('Modified Date') ,
'description' => 'When was the case (or closely related entity) was created or modified or deleted.',
'required' => false,
'export' => true,
'where' => 'civicrm_case.modified_date',
'headerPattern' => '',
'dataPattern' => '',
'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
'table_name' => 'civicrm_case',
'entity' => 'Case',
'bao' => 'CRM_Case_BAO_Case',
'localizable' => 0,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
......
......@@ -463,4 +463,24 @@
<headerPattern>/(activity.)?(star|favorite)/i</headerPattern>
<add>4.7</add>
</field>
<field>
<name>created_date</name>
<uniqueName>activity_created_date</uniqueName>
<type>timestamp</type>
<comment>When was the activity was created.</comment>
<required>false</required>
<export>true</export>
<default>NULL</default>
<add>4.7</add>
</field>
<field>
<name>modified_date</name>
<uniqueName>activity_modified_date</uniqueName>
<type>timestamp</type>
<comment>When was the activity (or closely related entity) was created or modified or deleted.</comment>
<required>false</required>
<export>true</export>
<default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
<add>4.7</add>
</field>
</table>
......@@ -191,4 +191,24 @@
<fieldName>is_deleted</fieldName>
<add>2.2</add>
</index>
<field>
<name>created_date</name>
<uniqueName>case_created_date</uniqueName>
<type>timestamp</type>
<comment>When was the case was created.</comment>
<required>false</required>
<export>true</export>
<default>NULL</default>
<add>4.7</add>
</field>
<field>
<name>modified_date</name>
<uniqueName>case_modified_date</uniqueName>
<type>timestamp</type>
<comment>When was the case (or closely related entity) was created or modified or deleted.</comment>
<required>false</required>
<export>true</export>
<default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
<add>4.7</add>
</field>
</table>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment