windows 10 reset django migrations

  1. Open a command prompt and navigate to the directory of your Django project.

  2. Run the following command to delete the database migration files:

del /s /q myapp\migrations

Replace "myapp" with the actual name of your app.

  1. Next, delete the database file itself. If you're using SQLite, the database file is typically named db.sqlite3. Use the following command to delete it:
del /q db.sqlite3
  1. After removing the migration files and the database file, you can re-create the initial migration for your app by running the following command:
python manage.py makemigrations myapp

Replace "myapp" with the actual name of your app.

  1. Finally, apply the initial migration to create the database schema:
python manage.py migrate