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

后端 未结 4 640
说谎
说谎 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:42

    The first step is remove the latest migrate version created, then you should use these commands:

     flask db stamp head
     flask db migrate -m "newMigration"
     flask db upgrade
    

提交回复
热议问题