Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to find source of: ERROR [root] Error: Can't locate revision identified by '..'

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
like image 266
GeoMeteoMe Avatar asked Sep 02 '19 13:09

GeoMeteoMe


2 Answers

Go to your database and delete the below table: alembic_versions

like image 60
Amrit Prasad Avatar answered Nov 14 '22 22:11

Amrit Prasad


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.

like image 28
Venus713 Avatar answered Nov 14 '22 22:11

Venus713