Target database is not up to date

前端 未结 11 1204
别那么骄傲
别那么骄傲 2020-12-12 16:54

I\'d like to make a migration for a Flask app. I am using Alembic.

However, I receive the following error.

T         


        
11条回答
  •  孤城傲影
    2020-12-12 17:26

    This can be solved bby many ways :

    1 To fix this error, delete the latest migration file ( a python file) then try to perform a migration afresh.

    If issue still persists try these commands :

    $ flask db stamp head  # To set the revision in the database to the head, without performing any migrations. You can change head to the required change you want.
    $ flask db migrate     # To detect automatically all the changes.
    $ flask db upgrade     # To apply all the changes.
    

提交回复
热议问题