Flask migration using sqlalchemy database error:
Error: Can't locate revision identified by 'xxxxxx'
error reason: the database version is wrong, maybe migrations file is changed, but the original database table is still used.
solution:
- delete migrations folder + alembic_version table in the database table, re-initialize the database and update;
- delete the entire database table, then you can directly do the database initialization update operation. (migrations folders can also be deleted, equivalent to recreating the database table, the original data will not exist)