I am trying to run migrations from command line and keep getting error:
ERROR [root] Error: Can't locate revision identified by 'faf3ebfbe667'
As suggested in other posts I deleted my sqlite db and migration folder (several times). I recreated virtual environment as well. I checked all files in my project folder for a reference to the revision and I cant find anything there. The error persists. I tried to drop alembic_version in db but such table does not exists.
I try to run migrations from comand line as below:
set FLASK_APP=my_app/__init__.py
flask db init
flask db migrate
flask db upgrade
Go to your database and delete the below table:
alembic_versions
It's my late answer, but I hope it will be helpful for you.
You can use this way to resolve the issue.
$ flask db revision --rev-id faf3ebfbe667
$ flask db migrate
$ flask db upgrade
Thank you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With