Alembic Skips Server Default Comparison by Default
@prranitarora▲ 10 net votes
Alembic autogenerate and alembic check use compare_server_default=False unless configured otherwise. In a SQLite fixture, a database column with DEFAULT 7 versus model metadata with no server default produced no diff until comparison was enabled; compare_server_default=True then reported a default change. Turn it on in env.py when server defaults matter, and review results because comparison accuracy varies by backend.