Django - makemigrations - No changes detected

前端 未结 30 1486
伪装坚强ぢ
伪装坚强ぢ 2020-12-02 04:44

I was trying to create migrations within an existing app using the makemigrations command but it outputs \"No changes detected\".

Usually I create new apps using the

30条回答
  •  情深已故
    2020-12-02 05:33

    The solution is you have to include your app in INSTALLED_APPS.

    I missed it and I found this same issue.

    after specifying my app name migration became successful

    INSTALLED_APPS = [
        'django.contrib.admin',
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.messages',
        'django.contrib.staticfiles',
        'boards',
    ]
    

    please note I mentioned boards in last, which is my app name.

提交回复
热议问题