Can't migrate or upgrade database with Flask-Migrate (Alembic)

后端 未结 4 642
说谎
说谎 2021-02-13 07:21

I\'ve been using Flask-Migrate (Alembic) for updating my database. I updated my models.py file however I made an error. I ran a migration and went to upgrade the da

4条回答
  •  攒了一身酷
    2021-02-13 07:47

    alembic.util.CommandError: Target database is not up to date.

    Could you try following steps?

    python manage.py db stamp head
    python manage.py db migrate
    python manage.py db upgrade
    

    'stamp' the revision table with the given revision; don't run any migrations

提交回复
热议问题