X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUpgrade%2FIncremental%2FLegacy.php;h=d1b08b7a6d28e4633f6158abcdc493290b43af0c;hb=a6da8f4ce01fc90680ae8c52c976797b2a953579;hp=26f8904995ca5919ff4f80dfc63f153140a1b331;hpb=71f4f2c6d8bd9e3a4a121bf47d0cc86aa8af0f33;p=civicrm-core.git diff --git a/CRM/Upgrade/Incremental/Legacy.php b/CRM/Upgrade/Incremental/Legacy.php index 26f8904995..d1b08b7a6d 100644 --- a/CRM/Upgrade/Incremental/Legacy.php +++ b/CRM/Upgrade/Incremental/Legacy.php @@ -110,8 +110,27 @@ SELECT id )); } } + + if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME, 'enable_innodb_fts', NULL, FALSE)) { + // The FTS indexing feature dynamically manipulates the schema which could + // cause conflicts with other layers that manipulate the schema. The + // simplest thing is to turn it off and back on. + + // It may not always be necessary to do this -- but I doubt we're going to test + // systematically in future releases. When it is necessary, one could probably + // ignore the matter and simply run CRM_Core_InnoDBIndexer::fixSchemaDifferences + // after the upgrade. But that's speculative. For now, we'll leave this + // advanced feature in the hands of the sysadmin. + $preUpgradeMessage .= '
' . ts('This database uses InnoDB Full Text Search for optimized searching. The upgrade procedure has not been tested with this feature. You should disable (and later re-enable) the feature by navigating to "Administer => System Settings => Miscellaneous".'); + } } + /** + * @param $template + * @param $message + * @param $latestVer + * @param $currentVer + */ static function checkMessageTemplate(&$template, &$message, $latestVer, $currentVer) { if (version_compare($currentVer, '3.1.alpha1') < 0) { return; @@ -177,7 +196,7 @@ SELECT id if ($flag == TRUE) { $html = "