Add in an index on geo_code_1 and geo_code_2 to assist with distance and other queries
authorSeamus Lee <seamuslee001@gmail.com>
Mon, 30 Sep 2019 06:18:18 +0000 (16:18 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Mon, 30 Sep 2019 06:18:18 +0000 (16:18 +1000)
CRM/Core/DAO/Address.php
xml/schema/Core/Address.xml

index 96de13e2c49a09dba0e750a2061069e4018d952c..8e97d3e336d29b88a92ad6ad9a0d72742872d0e8 100644 (file)
@@ -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;
   }
index 3e9ff7f5507bd867eda334ec0f34d7501f7fc954..183a1af5b09a671663178f595a2ef75cdf09a27e 100644 (file)
       <size>9</size>
     </html>
   </field>
+  <index>
+    <name>index_geo_code_1_geo_code_2</name>
+    <fieldName>geo_code_1</fieldName>
+    <fieldName>geo_code_2</fieldName>
+  </index>
   <field>
     <name>manual_geo_code</name>
     <title>Is Manually Geocoded</title>