Django 1.7 - makemigrations not detecting changes

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

    You want to check the settings.py in the INSTALLED_APPS list and make sure all the apps with models are listed in there.

    Running makemigrations in the project folder means it will look to update all the tables related to all the apps included in settings.py for the project. Once you include it, makemigrations will automatically include the app (this saves a lot of work so you don't have to run makemigrations app_name for every app in your project/site).

提交回复
热议问题