Created
February 2, 2016 16:13
-
-
Save rupakraj/5b98e3d8d83f1394196b to your computer and use it in GitHub Desktop.
Django migration reset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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