Django 1.7 - makemigrations not detecting changes

前端 未结 29 1519
忘了有多久
忘了有多久 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 13:12

    Added this answer because none of other available above worked for me.

    In my case something even more weird was happening (Django 1.7 Version), In my models.py I had an "extra" line at the end of my file (it was a blank line) and when I executed the python manage.py makemigrations command the result was: "no changes detected".

    To fix this I deleted this "blank line" that was at the end of my models.py file and I did run the command again, everything was fixed and all the changes made to models.py were detected!

提交回复
热议问题