No changes detected while running python manage.py makemigrations

Issues:

I want to recreate the migrations, so I deleted files under migrations folder, and drop the database. And try this python manage.py makemigrations, it reponse No changes detected.

Fix:

Create the database again, and clear files and folders under migrations, then try the following:

  1. python manage.py makemigrations --empty appname
  2. python manage.py makemigrations
  3. python manage.py migrate

It works!