diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index c0cca09bcb..7da533bf9d 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -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