Skip to content

Commit

Permalink
Support more table names for utf8mb4 conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwire committed Apr 22, 2020
1 parent b2f20f5 commit 550f351
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CRM/Core/BAO/SchemaHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -811,15 +811,15 @@ public static function migrateUtf8mb4($revert = FALSE) {
$dao = new CRM_Core_DAO();
$database = $dao->_database;
CRM_Core_DAO::executeQuery("ALTER DATABASE $database CHARACTER SET = $newCharSet COLLATE = $newCollation");
$dao = CRM_Core_DAO::executeQuery("SHOW TABLE STATUS WHERE Engine = 'InnoDB' AND Name LIKE 'civicrm\_%'");
$dao = CRM_Core_DAO::executeQuery("SHOW TABLE STATUS WHERE Engine = 'InnoDB' AND (Name LIKE 'civicrm\_%' OR Name LIKE 'civi%\_%' OR Name LIKE 'veda%\_%')");
while ($dao->fetch()) {
$tables[$dao->Name] = [
'Engine' => $dao->Engine,
];
}
$dsn = defined('CIVICRM_LOGGING_DSN') ? DB::parseDSN(CIVICRM_LOGGING_DSN) : DB::parseDSN(CIVICRM_DSN);
$logging_database = $dsn['database'];
$dao = CRM_Core_DAO::executeQuery("SHOW TABLE STATUS FROM `$logging_database` WHERE Engine <> 'MyISAM' AND Name LIKE 'log\_civicrm\_%'");
$dao = CRM_Core_DAO::executeQuery("SHOW TABLE STATUS FROM `$logging_database` WHERE Engine <> 'MyISAM' AND (Name LIKE 'log\_civicrm\_%' OR Name LIKE 'log\_civi%\_%' OR Name LIKE 'log\_veda%\_%')");
while ($dao->fetch()) {
$tables["$logging_database.{$dao->Name}"] = [
'Engine' => $dao->Engine,
Expand Down

0 comments on commit 550f351

Please sign in to comment.