From 11e5567fe89080ed8ad8fae5e6f33ed8dcfc321b Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 3 Sep 2019 19:23:13 +1200 Subject: [PATCH] Add index to civicrm_contact.created_date & modified_date Note this will add the indexes to new installs or to installs who run the script to update indexes (we used to promote this via a status check but there was a bug & we 'hushed' it & stopped trying to fix the bug) --- CRM/Contact/DAO/Contact.php | 18 +++++++++++++++++- xml/schema/Contact/Contact.xml | 10 ++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/DAO/Contact.php b/CRM/Contact/DAO/Contact.php index f881d6844c..a7da4e718e 100644 --- a/CRM/Contact/DAO/Contact.php +++ b/CRM/Contact/DAO/Contact.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Contact/Contact.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:784d1da70e301866b556ced4c46b4ca9) + * (GenCodeChecksum:ee3bf9f2d1faed5a4de439ecf0537ac6) */ /** @@ -1591,6 +1591,22 @@ class CRM_Contact_DAO_Contact extends CRM_Core_DAO { 'localizable' => FALSE, 'sig' => 'civicrm_contact::0::is_deleted::sort_name::id', ], + 'index_created_date' => [ + 'name' => 'index_created_date', + 'field' => [ + 0 => 'created_date', + ], + 'localizable' => FALSE, + 'sig' => 'civicrm_contact::0::created_date', + ], + 'index_modified_date' => [ + 'name' => 'index_modified_date', + 'field' => [ + 0 => 'modified_date', + ], + 'localizable' => FALSE, + 'sig' => 'civicrm_contact::0::modified_date', + ], ]; return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; } diff --git a/xml/schema/Contact/Contact.xml b/xml/schema/Contact/Contact.xml index c28b2f2874..14965f9ffc 100644 --- a/xml/schema/Contact/Contact.xml +++ b/xml/schema/Contact/Contact.xml @@ -876,6 +876,11 @@ NULL 4.3 + + index_created_date + created_date + 5.18 + modified_date timestamp @@ -885,4 +890,9 @@ CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP 4.3 + + index_modified_date + modified_date + 5.18 + -- 2.25.1