mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
CI: More MySQL work
This commit is contained in:
parent
a2b3559a4c
commit
0660952efd
1 changed files with 7 additions and 2 deletions
9
.github/actions/run-tests/action.yml
vendored
9
.github/actions/run-tests/action.yml
vendored
|
|
@ -80,9 +80,14 @@ runs:
|
|||
|
||||
- name: Set MySQL table row format after migrations (safety check)
|
||||
if: ${{ inputs.testing-db == 'mysql' }}
|
||||
working-directory: testing_mygame
|
||||
run: |
|
||||
python -c "import os; import django; os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'server.conf.settings'); django.setup(); from django.db import connection; cursor = connection.cursor(); cursor.execute(\"SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() AND ENGINE = 'InnoDB'\"); tables = [row[0] for row in cursor.fetchall()]; [cursor.execute(f'ALTER TABLE \`{table}\` ROW_FORMAT=DYNAMIC') or print(f'Set ROW_FORMAT=DYNAMIC for table {table}') for table in tables]"
|
||||
mysql -h 127.0.0.1 -u evennia -ppassword evennia -e "
|
||||
SELECT CONCAT('ALTER TABLE \`', TABLE_NAME, '\` ROW_FORMAT=DYNAMIC;') AS stmt
|
||||
FROM information_schema.TABLES
|
||||
WHERE TABLE_SCHEMA = 'evennia' AND ENGINE = 'InnoDB'
|
||||
" | grep -v stmt | while read stmt; do
|
||||
mysql -h 127.0.0.1 -u evennia -ppassword evennia -e "$stmt" 2>/dev/null || true
|
||||
done
|
||||
shell: bash
|
||||
|
||||
- name: Collect static files
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue