Skip to content

Commit 11410fc

Browse files
committed
AC-9755:Set default collation to utf8mb4 for MySQL
1 parent ebd865c commit 11410fc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

setup/src/Magento/Setup/Model/Installer.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ private function setupModuleRegistry(SchemaSetupInterface $setup)
667667
$columns = ['module' => ['varchar(50)',''],
668668
'schema_version' => ['varchar(50)',''],
669669
'data_version' => ['varchar(50)','']];
670-
$this->updateDBTable($tableName, $columns, $connection);
670+
$this->setColumnCollationAndCharset($tableName, $columns, $connection);
671671
}
672672
}
673673
}
@@ -734,7 +734,7 @@ private function setupSessionTable(
734734
if (preg_match('/\b('. self::OLDCHARSET .')\b/', $getTableSchema)) {
735735
$tableName = $setup->getTable('session');
736736
$columns = ['session_id' => ['varchar(255)','']];
737-
$this->updateDBTable($tableName, $columns, $connection);
737+
$this->setColumnCollationAndCharset($tableName, $columns, $connection);
738738
}
739739
}
740740
}
@@ -797,7 +797,7 @@ private function setupCacheTable(
797797
if (preg_match('/\b('. self::OLDCHARSET .')\b/', $getTableSchema)) {
798798
$tableName = $setup->getTable('cache');
799799
$columns = ['id' => ['varchar(200)','']];
800-
$this->updateDBTable($tableName, $columns, $connection);
800+
$this->setColumnCollationAndCharset($tableName, $columns, $connection);
801801
}
802802
}
803803
}
@@ -842,7 +842,7 @@ private function setupCacheTagTable(
842842
if (preg_match('/\b('. self::OLDCHARSET .')\b/', $getTableSchema)) {
843843
$tableName = $setup->getTable('cache_tag');
844844
$columns = ['tag' => ['varchar(100)',''],'cache_id' => ['varchar(200)','']];
845-
$this->updateDBTable($tableName, $columns, $connection);
845+
$this->setColumnCollationAndCharset($tableName, $columns, $connection);
846846
}
847847
}
848848
}
@@ -906,7 +906,7 @@ private function setupFlagTable(
906906
$getTableSchema = $connection->getCreateTable($tableName) ?? '';
907907
if (preg_match('/\b('. self::OLDCHARSET .')\b/', $getTableSchema)) {
908908
$columns = ['flag_code' => ['varchar(255)','NOT NULL'],'flag_data' => ['mediumtext','']];
909-
$this->updateDBTable($tableName, $columns, $connection);
909+
$this->setColumnCollationAndCharset($tableName, $columns, $connection);
910910
}
911911
}
912912
}
@@ -1891,7 +1891,7 @@ private function reindexAll(): void
18911891
* @param AdapterInterface $connection
18921892
* @return void
18931893
*/
1894-
private function updateDBTable(string $tableName, array $columns, $connection) : void
1894+
private function setColumnCollationAndCharset(string $tableName, array $columns, $connection) : void
18951895
{
18961896
$charset = $this->columnConfig->getDefaultCharset();
18971897
$collate = $this->columnConfig->getDefaultCollation();

0 commit comments

Comments
 (0)