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)
Read More:
- Lua — using remove to delete table data
- Hadoop datanode using JPS to view the solution that can’t be started
- Django. DB. Utils. Programmingerror: (1146, “table * doesn’t exist”) causes and Solutions
- MySQL partitions the existing tables of the data table
- Datagrip import & export table structure and data
- Oracle database file is damaged, Error:ORA-01033 :ORACLE initialization or shutdown in progress
- mysql error 1093
- Oracle can’t start the database due to deleting DBF file by mistake
- Lock wait timeout exceeded — transaction and index
- MySQL:Foreign key fails with error Error Code: 1452.
- Global lock, table lock and row lock in MySQL
- MySQL — initialize failed to generate temporary password in error log after initialization
- MySQL error — multiple methods of failed to find valid data directory and MySQL setting password appear
- Import / export. SQL file / gzip file for MySQL under Linux
- Python flash project to obtain the request user IP address addr
- How to prevent duplicate submission
- Error: Could not locate Flask application. You did not provide the FLASK_APP environment variable.
- mysql ERROR 1050 (42S01): Table already exists
- Solution to error 1452: cannot add or update a child row: a foreign key constraint failures in MySQL
- Caused by: org.flywaydb.core.api.FlywayException: Validate failed: Migration checksum mismatch for m