Use utf8mb4_unicode_ci instead of utf8mb4_general_ci in upgrade
This commit is contained in:
@ -459,7 +459,7 @@ function serendipity_upgrader_move_syndication_config() {
|
||||
}
|
||||
}
|
||||
|
||||
# When mysql is used in a version new enough (at least 5.6.4/10.0.5), upgrade all UTF8 tables to utf8mb4. For that to work well
|
||||
# When mysql is used in a version new enough (at least 5.6/10.0.5), upgrade all UTF8 tables to utf8mb4. For that to work well
|
||||
# we also need to set the storage engine to InnoDB. Earlier version set it to MyISAM.
|
||||
function serendipity_upgradeUTF8_UTF8mb4() {
|
||||
global $serendipity;
|
||||
@ -500,7 +500,7 @@ function serendipity_upgradeUTF8_UTF8mb4() {
|
||||
# Good, now we can set it it utf8mb4. utf8mb4 is fully compatible with utf8, so there won't be broken chars
|
||||
foreach ($tables AS $table) {
|
||||
$table = $table[0];
|
||||
serendipity_db_query('ALTER TABLE `' . $table . '` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci');
|
||||
serendipity_db_query('ALTER TABLE `' . $table . '` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user