No changes detected in Alembic autogeneration of migrations with Flask-SQLAlchemy

后端 未结 5 1892
有刺的猬
有刺的猬 2020-12-24 02:35

I\'m having trouble getting Alembic to autogenerate candidate migrations from changes to classes using db.Model (Flask-SQLAlchemy) instead of Base.

5条回答
  •  执笔经年
    2020-12-24 03:10

    My mistake was to try creating my initial migration with the db already in the final state, thinking it would notice it had no existing versions and base it on the models. I got empty versions until I deleted all tables in the db and then it worked fine.

提交回复
热议问题