Skip to content
Snippets Groups Projects
Commit 487813ab authored by mattwire's avatar mattwire
Browse files

Set activity_date_time and created_date to default to current_timestamp

parent 96cd5bcf
Branches
Tags
No related merge requests found
......@@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Activity/Activity.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:69e64467532d53d75fadb5148fe42e76)
* (GenCodeChecksum:bb8686f72b71e21504c9b7bc95489a0c)
*/
/**
......@@ -328,10 +328,12 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
'title' => ts('Activity Date'),
'description' => ts('Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.'),
'required' => FALSE,
'import' => TRUE,
'where' => 'civicrm_activity.activity_date_time',
'headerPattern' => '/(activity.)?date(.time$)?/i',
'export' => TRUE,
'default' => 'CURRENT_TIMESTAMP',
'table_name' => 'civicrm_activity',
'entity' => 'Activity',
'bao' => 'CRM_Activity_BAO_Activity',
......@@ -672,7 +674,7 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
'required' => FALSE,
'where' => 'civicrm_activity.created_date',
'export' => TRUE,
'default' => 'NULL',
'default' => 'CURRENT_TIMESTAMP',
'table_name' => 'civicrm_activity',
'entity' => 'Activity',
'bao' => 'CRM_Activity_BAO_Activity',
......
......@@ -56,7 +56,7 @@ class CRM_Upgrade_Incremental_General {
*
* @see install/index.php
*/
const MIN_INSTALL_MYSQL_VER = '5.5';
const MIN_INSTALL_MYSQL_VER = '5.6.5';
/**
* The minimum MySQL/MariaDB version required to install Civi.
......
{* file to handle db changes in 5.28.alpha1 during upgrade *}
-- https://github.com/civicrm/civicrm-core/pull/17450
ALTER TABLE `civicrm_activity` CHANGE `activity_date_time` `activity_date_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.';
ALTER TABLE `civicrm_activity` CHANGE `created_date` `created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'When was the activity was created.';
......@@ -122,6 +122,9 @@
<field>
<name>activity_date_time</name>
<import>true</import>
<required>false</required>
<export>true</export>
<default>CURRENT_TIMESTAMP</default>
<title>Activity Date</title>
<type>datetime</type>
<headerPattern>/(activity.)?date(.time$)?/i</headerPattern>
......@@ -467,7 +470,7 @@
<comment>When was the activity was created.</comment>
<required>false</required>
<export>true</export>
<default>NULL</default>
<default>CURRENT_TIMESTAMP</default>
<add>4.7</add>
</field>
<field>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment