SQLAlchemy and Alembic 2 · Alembic migrations

Generate a migration

Compare your models with the database and write a migration. Always review the generated file.

alembic revision --autogenerate -m "add users table"

Official SQLAlchemy and Alembic 2 documentation

More alembic migrations commands

All alembic migrations commands · SQLAlchemy and Alembic 2 cheatsheet

Was this page helpful?