jenkins-bot has submitted this change and it was merged.
Change subject: Add hook to define log tables, specifying INNODB & indexing
contact fields
......................................................................
Add hook to define log tables, specifying INNODB & indexing contact fields
Bug: T130161
Change-Id: I2d8b027568e1f02ec8c69bd4f5329c1b367cf617
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 25 insertions(+), 0 deletions(-)
Approvals:
Awight: Looks good to me, approved
jenkins-bot: Verified
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index ef290a7..291f74e 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -2228,6 +2228,31 @@
}
/**
+ * Implements hook_logTableSpec().
+ *
+ * @param array $logTableSpec
+ */
+function wmf_civicrm_civicrm_logTableSpec(&$logTableSpec) {
+ $logTableSpec['wmf_donor'] = array();
+ $logTableSpec['wmf_contribution_extra'] = array();
+ $contactReferences = CRM_Dedupe_Merger::cidRefs();
+ foreach (array_keys($logTableSpec) as $tableName) {
+ $contactIndexes = array();
+ $logTableSpec[$tableName]['engine'] = 'INNODB';
+ $logTableSpec[$tableName]['engine_config'] = 'ROW_FORMAT=COMPRESSED
KEY_BLOCK_SIZE=4';
+ $contactRefsForTable = CRM_Utils_Array::value($tableName,
$contactReferences, array());
+ foreach ($contactRefsForTable as $fieldName) {
+ $contactIndexes['index_' . $fieldName] = $fieldName;
+ }
+ $logTableSpec[$tableName]['indexes'] = array_merge(array(
+ 'index_id' => 'id',
+ 'index_log_conn_id' => 'log_conn_id',
+ 'index_log_date' => 'log_date',
+ ), $contactIndexes);
+ }
+}
+
+/**
* Check if any completed contributions exist for the contact after the
provided date.
*
* @param int $contact_id
--
To view, visit https://gerrit.wikimedia.org/r/277934
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2d8b027568e1f02ec8c69bd4f5329c1b367cf617
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Eileen <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits