Django 1.7 - makemigrations not detecting changes

前端 未结 29 1501
忘了有多久
忘了有多久 2020-11-27 12:43

As the title says, I can\'t seem to get migrations working.

The app was originally under 1.6, so I understand that migrations won\'t be there initially, and indeed i

29条回答
  •  醉酒成梦
    2020-11-27 12:55

    Adding this answer because only this method helped me.

    I deleted the migrations folder run makemigrations and migrate.
    It still said: No migrations to apply.

    I went to migrate folder and opened the last created file,
    comment the migration I wanted(It was detected and entered there)
    and run migrate again.

    This basically editing the migrations file manually.
    Do this only if you understand the file content.

提交回复
热议问题