Skip to content

Instantly share code, notes, and snippets.

@rupakraj
Created February 2, 2016 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rupakraj/5b98e3d8d83f1394196b to your computer and use it in GitHub Desktop.
Save rupakraj/5b98e3d8d83f1394196b to your computer and use it in GitHub Desktop.
Django migration reset
WARNING: its hard reset, means all the data or log will be removed
To reset the django migration to initial follow following order
* Remove database
* Remove all the contents of django app's migrations folder except __init__.py file.
* The remaining migrations folder should be something like
myapp
├── migrations
│   │   ├── __init__.py
* Create new database or remove all the objects from database
* $ python manage.py makemigrations
* $ python manage.py migrate
Done :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment