diff --git a/CRM/Upgrade/Incremental/php/FourSeven.php b/CRM/Upgrade/Incremental/php/FourSeven.php index a549ee5acd0..1a7e9da7898 100644 --- a/CRM/Upgrade/Incremental/php/FourSeven.php +++ b/CRM/Upgrade/Incremental/php/FourSeven.php @@ -404,6 +404,26 @@ public function upgrade_4_7_23($rev) { $this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev); } + /** + * Upgrade function. + * + * @param string $rev + */ + public function upgrade_4_7_24($rev) { + $this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev); + + $this->addTask('CRM-20958 - Add created_date to civicrm_activity', 'addColumn', + 'civicrm_activity', 'created_date', "timestamp NULL DEFAULT NULL COMMENT 'When was the activity was created.'"); + $this->addTask('CRM-20958 - Add modified_date to civicrm_activity', 'addColumn', + 'civicrm_activity', 'modified_date', "timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'When was the activity (or closely related entity) was created or modified or deleted.'"); + $this->addTask('CRM-20958 - Add created_date to civicrm_case', 'addColumn', + 'civicrm_case', 'created_date', "timestamp NULL DEFAULT NULL COMMENT 'When was the case was created.'"); + $this->addTask('CRM-20958 - Add modified_date to civicrm_case', 'addColumn', + 'civicrm_case', 'modified_date', "timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'When was the case (or closely related entity) was created or modified or deleted.'"); + + return TRUE; + } + /* * Important! All upgrade functions MUST add a 'runSql' task. * Uncomment and use the following template for a new upgrade version