SQLAlchemy Alembic Migration generate SQL scripts at revision step with --autogenerate

Viewed 16

We use SQLAlchemy + Alembic to generate migrations as python code (default behaviour for Alembic).
We want to move from python to SQL scripts as it provides more control over the generated scripts.
It seems the command revision --autogenerate doesn't work with --sql option.
We don't want to use updgrade --sql option as it just spits the SQL script but doesn't track it or can't be subsequently used with revision --autogenerate
Is there a way to generate migrations as SQL scripts automatically?

0 Answers
Related