What those hex filenames mean, why migrations silently applied to the wrong database for two months, and how to widen a CHECK constraint without quietly breaking it.

Alembic is the migration tool for SQLAlchemy. Most tutorials get you as far as

alembic revision --autogenerate and stop, which leaves you unprepared for the

two things that actually go wrong: SQLite's refusal to alter constraints, and

configuration that points migrations at a different database than your