SQLAlchemy and Alembic 2 · Alembic migrations
Generate SQL without running it
Print the SQL of a migration for review or for a DBA to run.
alembic upgrade head --sql
Official SQLAlchemy and Alembic 2 documentation
More alembic migrations commands
- Install Alembic
- Create a migration environment
- Generate a migration
- Apply migrations
- Undo the last migration
- Check the current revision
All alembic migrations commands · SQLAlchemy and Alembic 2 cheatsheet