Issue
There are more than 100 files in alembic version directory. How to use alembic command to merge these file into a one file?
I am try to use this:
alembic revision --autogenerate
but doesn't work! Anyone has good idea?
Solution
If you have all the models in models.py (or whatever you use for models), it should be possible to achieve your goal by recreating migrations in a single file. Like this:
- Point Alembic to a different and empty database
- run
alembic revision --autogenerate
- You'll get the mirroring revision in a single file.
Answered By - Igor
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.