Add location_id if missing CRM-20711.
authoreileen <emcnaughton@wikimedia.org>
Tue, 3 Jul 2018 22:29:40 +0000 (10:29 +1200)
committereileen <emcnaughton@wikimedia.org>
Tue, 3 Jul 2018 22:29:40 +0000 (10:29 +1200)
On a small number of installs it seems location_id is missing from the group_contact table. This adds if missing

CRM/Upgrade/Incremental/php/FiveFour.php

index 8ea5630a40ac269572245aa098bc9e3f8be78389..16d3e73e9623a2b925fa2e31f5112a0eaede8929 100644 (file)
@@ -71,6 +71,8 @@ class CRM_Upgrade_Incremental_php_FiveFour extends CRM_Upgrade_Incremental_Base
     $this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev);
     $this->addTask('Add Cancel Button Setting to the Profile', 'addColumn',
       'civicrm_uf_group', 'add_cancel_button', "tinyint DEFAULT '1' COMMENT 'Should a Cancel button be included in this Profile form.'");
+    $this->addTask('Add location_id if missing to group_contact table (affects some older installs CRM-20711)', 'addColumn',
+      'civicrm_group_contact', 'location_id', "int(10) unsigned DEFAULT NULL COMMENT 'Optional location to associate with this membership'");
   }
 
   /*