Deleting all migrations and starting over throwing errors
See original GitHub issueWhat happened?
I’m trying to delete all migration files and starting over. But I’m getting this error when running makemigrations:
django.db.migrations.exceptions.NodeNotFoundError: Migration socialaccount.0001_initial dependencies reference nonexistent parent node ('sites', '0001_initial')
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Deleting all migrations and starting over throwing errors #1933
I'm trying to delete all migration files and starting over. ... this error when running makemigrations: django.db.migrations.exceptions.
Read more >How to Reset Migrations - Simple is Better Than Complex
1. Remove the all migrations files within your project. Go through each of your projects apps migration folder and remove everything inside, ...
Read more >Django: Safely Remove Old Migrations? - Stack Overflow
Deleting Django migrations is generally a bad idea. Django keeps track of what's in your db through these migration files, as well as...
Read more >How Do I Reset Django Migration - raturi.in
In this tutorial, you will learn about resetting Django applied migrations and creating fresh migrations. Django's migration can be reset by ...
Read more >Resetting Entity Framework Migrations to a clean Slate
This post describes the steps on how to remove existing migrations and create a new initial migration from the current schema.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You have deleted contrib/sites/migrations/* whilst the project settings overrides the contrib.sites migrations. Either revert the deletion of the
contrib/sites/migrations/*
migrations or remove theMIGRATION_MODULES
from your setting.I run into this problem frequently, the only way I have found to remedy this is to restore /contrib/sites/migrations/0001_initial.py from the git in order to preserve the migration history