Skip to content

Instantly share code, notes, and snippets.

@philangist
Created August 4, 2013 00:21
Show Gist options
  • Save philangist/6148522 to your computer and use it in GitHub Desktop.
Save philangist/6148522 to your computer and use it in GitHub Desktop.
Reset db to fix any migration inconsistencies in Django
#delete all migrations and reset models.py to initial state
rm -r app/migrations/
chmod +x manage.py
./manage.py flush
./manage.py schemamigration app --initial
./manage.py migrate app --fake
#after changing models.py
./manage.py schemamigration app --auto
./manage.py migrate app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment