From d56bfd0ebbf6f58c36ab7e690a59606dd6dea279 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 30 Sep 2019 16:18:18 +1000 Subject: [PATCH] Add in an index on geo_code_1 and geo_code_2 to assist with distance and other queries --- CRM/Core/DAO/Address.php | 11 ++++++++++- xml/schema/Core/Address.xml | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CRM/Core/DAO/Address.php b/CRM/Core/DAO/Address.php index 96de13e2c4..8e97d3e336 100644 --- a/CRM/Core/DAO/Address.php +++ b/CRM/Core/DAO/Address.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Core/Address.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:e026e63074a6ffc2f4fda166e6ea6b5a) + * (GenCodeChecksum:4e3b66ed828527539c525b2ffc71e606) */ /** @@ -889,6 +889,15 @@ class CRM_Core_DAO_Address extends CRM_Core_DAO { 'localizable' => FALSE, 'sig' => 'civicrm_address::0::city', ], + 'index_geo_code_1_geo_code_2' => [ + 'name' => 'index_geo_code_1_geo_code_2', + 'field' => [ + 0 => 'geo_code_1', + 1 => 'geo_code_2', + ], + 'localizable' => FALSE, + 'sig' => 'civicrm_address::0::geo_code_1::geo_code_2', + ], ]; return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; } diff --git a/xml/schema/Core/Address.xml b/xml/schema/Core/Address.xml index 3e9ff7f550..183a1af5b0 100644 --- a/xml/schema/Core/Address.xml +++ b/xml/schema/Core/Address.xml @@ -392,6 +392,11 @@ 9 + + index_geo_code_1_geo_code_2 + geo_code_1 + geo_code_2 + manual_geo_code Is Manually Geocoded -- 2.25.1