Error flask migration database: Target database is not up solutions

When database migration flask in error, the error message is "Target database is not up", the following solutions

  • Alembic find the latest version number, find the folder under the latest version of migrate, the file name is the latest version number (remove the end _)
  • And then update the fields in a database table alembic_version version_num, the value is changed to the latest version number field
  • Migration can be successful again

Another way (if your data is unimportant words): Delete the data files and migrate files to re-initialize the database.

Guess you like

Origin www.cnblogs.com/iamluoli/p/11115796.html