On MySQL/MariaDB, DDL statements auto-commit and cannot be rolled back.
If a migration is interrupted after CREATE TABLE but before the Alembic
version stamp is written, the next run crashes with "table already exists"
causing a boot loop. This adds existence checks via create_table_if_not_exists
and drop_table_if_exists helpers to make all migrations re-runnable.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>