CI: Reverting and moving to SQL
This commit is contained in:
parent
c5fadb009e
commit
363296022d
2 changed files with 9 additions and 5 deletions
13
.github/actions/setup-database/action.yml
vendored
13
.github/actions/setup-database/action.yml
vendored
|
|
@ -43,11 +43,16 @@ runs:
|
||||||
echo "MySQL is ready"
|
echo "MySQL is ready"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Set up MySQL Privileges
|
- name: Set up MySQL Configuration and Privileges
|
||||||
if: ${{ inputs.database == 'mysql' }}
|
if: ${{ inputs.database == 'mysql' }}
|
||||||
run: |
|
run: |
|
||||||
# Note: MySQL server configuration (character set, collation, row format) is set
|
# Set MySQL global variables for character set, collation, and row format
|
||||||
# at container startup via the mysql.cnf config file mounted in the workflow
|
# 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
|
# Ensure user exists and has proper privileges
|
||||||
mysql -u root -proot_password -h 127.0.0.1 mysql <<EOF
|
mysql -u root -proot_password -h 127.0.0.1 mysql <<EOF
|
||||||
CREATE USER IF NOT EXISTS 'evennia'@'%' IDENTIFIED BY 'password';
|
CREATE USER IF NOT EXISTS 'evennia'@'%' IDENTIFIED BY 'password';
|
||||||
|
|
@ -55,7 +60,7 @@ runs:
|
||||||
GRANT PROCESS ON *.* TO 'evennia'@'%';
|
GRANT PROCESS ON *.* TO 'evennia'@'%';
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
EOF
|
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
|
mysql -u root -proot_password -h 127.0.0.1 evennia <<EOF
|
||||||
ALTER DATABASE evennia CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
ALTER DATABASE evennia CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
EOF
|
EOF
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,6 @@ jobs:
|
||||||
--health-interval=10s
|
--health-interval=10s
|
||||||
--health-timeout=5s
|
--health-timeout=5s
|
||||||
--health-retries=3
|
--health-retries=3
|
||||||
--entrypoint="/bin/sh -c \"printf '[mysqld]\ncharacter-set-server=utf8mb4\ncollation-server=utf8mb4_unicode_ci\ninnodb-default-row-format=DYNAMIC\n' > /etc/mysql/conf.d/custom.cnf && exec /usr/local/bin/docker-entrypoint.sh mysqld\""
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue