Use utf8mb3 for MySQL (same as existing release) to fix CI

This commit is contained in:
Griatch 2026-02-14 09:38:39 +01:00
parent 7480772404
commit abcb3d1cc3
3 changed files with 7 additions and 7 deletions

View file

@ -51,7 +51,7 @@ runs:
# The user 'evennia' is already created by the action for hosts: localhost, 127.0.0.1, and ::1
# We just need to create the database and grant additional privileges.
mysql -u root -proot_password mysql <<EOF
CREATE DATABASE IF NOT EXISTS evennia CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE IF NOT EXISTS evennia CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci;
-- Grant privileges to existing user hosts (action creates: localhost, 127.0.0.1, ::1)
GRANT ALL PRIVILEGES ON \`evennia%\`.* TO 'evennia'@'localhost';
GRANT ALL PRIVILEGES ON \`evennia%\`.* TO 'evennia'@'127.0.0.1';

View file

@ -68,8 +68,8 @@ jobs:
password: password
my-cnf: |
[mysqld]
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
character-set-server=utf8mb3
collation-server=utf8mb3_unicode_ci
innodb_default_row_format=DYNAMIC
innodb_file_per_table=1

View file

@ -47,21 +47,21 @@ DATABASES = {
"HOST": "127.0.0.1",
"PORT": "", # use default port
"OPTIONS": {
"charset": "utf8mb4",
"charset": "utf8mb3",
# Note: MySQL server global settings (character set, collation, row format) are set
# in setup-database action before migrations run. The init_command sets per-connection
# variables that don't require special privileges.
"init_command": (
"SET collation_connection=utf8mb4_unicode_ci, "
"SET collation_connection=utf8mb3_unicode_ci, "
"sql_mode='STRICT_TRANS_TABLES', innodb_strict_mode=1"
),
},
"TEST": {
"NAME": "evennia",
"OPTIONS": {
"charset": "utf8mb4",
"charset": "utf8mb3",
"init_command": (
"SET collation_connection=utf8mb4_unicode_ci, "
"SET collation_connection=utf8mb3_unicode_ci, "
"sql_mode='STRICT_TRANS_TABLES', innodb_strict_mode=1"
),
},