django 1.7 migrations — how do I clear all migrations and start over from scratch?

后端 未结 2 1461
暗喜
暗喜 2021-01-30 03:56

So I\'m rapidly iterating on a django app at the moment and I\'m constantly adjusting models.py. Over the course of a day or two of programming and testing I generate a couple

2条回答
  •  無奈伤痛
    2021-01-30 04:47

    So the step-by-step plan I outlined in my question does work, but instead of deleting rows from the south_migrationhistory database table, I had to delete rows from the django_migrations database table.

    The command is: DELETE FROM django_migrations WHERE app='my_app'

    Once this is done, you will be able to re-run your migrations from scratch.

提交回复
热议问题