CI: Reverting and moving to SQL

This commit is contained in:
Griatch 2025-12-19 13:12:19 +01:00
parent c5fadb009e
commit 363296022d
2 changed files with 9 additions and 5 deletions

View file

@ -43,11 +43,16 @@ runs:
echo "MySQL is ready"
shell: bash
- name: Set up MySQL Privileges
- name: Set up MySQL Configuration and Privileges
if: ${{ inputs.database == 'mysql' }}
run: |
# Note: MySQL server configuration (character set, collation, row format) is set
# at container startup via the mysql.cnf config file mounted in the workflow
# Set MySQL global variables for character set, collation, and row format
# These must be set before migrations run to ensure tables are created with correct settings
mysql -u root -proot_password -h 127.0.0.1 mysql <<EOF
SET GLOBAL character_set_server = 'utf8mb4';
SET GLOBAL collation_server = 'utf8mb4_unicode_ci';
SET GLOBAL innodb_default_row_format = 'DYNAMIC';
EOF
# Ensure user exists and has proper privileges
mysql -u root -proot_password -h 127.0.0.1 mysql <<EOF
CREATE USER IF NOT EXISTS 'evennia'@'%' IDENTIFIED BY 'password';
@ -55,7 +60,7 @@ runs:
GRANT PROCESS ON *.* TO 'evennia'@'%';
FLUSH PRIVILEGES;
EOF
# Set database character set (server defaults are set via config file, but ensure DB matches)
# Set database character set and collation
mysql -u root -proot_password -h 127.0.0.1 evennia <<EOF
ALTER DATABASE evennia CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
EOF