天天看點

Django makemigrations 報錯No changes detected

>python manage.py makemigrations
No changes detected
           

在使用makemigrations 出現了 No changes detected錯誤

No changes detected的中文意思是沒有變化檢測

出現這種可能的情況一種migrations檔案夾丢失

或者檔案夾内檔案丢失.

解決方法如下

python manage.py makemigrations --empty [APP名]
           

然後再使用python manage.py makemigrations