Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python alembic offline mode without alembic_version table

I'd like to use alembic in offline mode, and execute the SQL migrations from an external software.
The external software tracks the DB version, so I don't need the alembic_version table at all.
Do you know if I can generate SQL migrations without creating an alembic_version table ? Is it a supported feature ?

Thanks

like image 622
Kiruahxh Avatar asked Oct 29 '25 06:10

Kiruahxh


1 Answers

I don't think generating migrations off line is an available feature till now as @zzzeek wrote in 'Writing Migration Scripts to Support Script Generation' section in the official tutorial https://alembic.zzzcomputing.com/en/latest/offline.html . I do hope the new feature will come as my project can't connect to the database server directly but generating sql scripts off line will save my time by preventing writing SQL DDL and SqlAlchemy objects both.

like image 106
Jingyuan Avatar answered Nov 01 '25 12:11

Jingyuan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!