I have installed the Flask-Migration and initialised the migration however I would receive the following error when i run python3 manage.py db migrate
.
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/alembic/script.py", line 104, in get_revision
raise util.CommandError("No such revision '%s'" % id_)
alembic.util.CommandError: No such revision '38340accc10'
As suggested in Cannot complete Flask-Migration a possible reason would be that I have done an upgrade which generated the above revision '38340accc10', but then deleted whole migrations/ directory and removed all upgrade scripts.
How do I delete the Alembic versions in my database? I have tried recreating the database with db.drop_all()
and db.create_all()
but the same error appears.