Django 1.7 - makemigrations not detecting changes

前端 未结 29 1520
忘了有多久
忘了有多久 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:54

    1. Remove changes what you want to sync.
    2. Run python manage.py makemigrations app_label for the initial migration.
    3. Run python manage.py migrate for creating tables before you make changes.
    4. Paste changes which you remove at first step.
    5. Run 2. and 3. steps

提交回复
热议问题