CRM-18006 - civicrm_install_canary - Ensure ENGINE is InnoDB
authorTim Otten <totten@civicrm.org>
Mon, 25 Apr 2016 23:13:07 +0000 (16:13 -0700)
committerColeman Watts <coleman@civicrm.org>
Tue, 26 Apr 2016 19:39:08 +0000 (15:39 -0400)
This should resolve warnings on systems where MyISAM was default engine.

CRM/Upgrade/Incremental/php/FourSeven.php

index 94ed0dfb1b50b39bb07834b1bb53f88f38e5c0fc..971c58486bf2cc81636ff7da24c07d3bfe61a0b6 100644 (file)
@@ -183,6 +183,13 @@ class CRM_Upgrade_Incremental_php_FourSeven extends CRM_Upgrade_Incremental_Base
     $this->addTask('Add Contact Deleted by Merge Activity Type', 'addDeletedByMergeActivityType');
   }
 
+  public function upgrade_4_7_7($rev) {
+    // https://issues.civicrm.org/jira/browse/CRM-18006
+    if (CRM_Core_DAO::checkTableExists('civicrm_install_canary')) {
+      CRM_Core_DAO::executeQuery('ALTER TABLE civicrm_install_canary ENGINE=InnoDB');
+    }
+  }
+
   /**
    * CRM-16354
    *