-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1b7233
commit 43be57b
Showing
7 changed files
with
66 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Django reset migrations | ||
======================= | ||
|
||
Add one command to reset the django migrations. | ||
|
||
Sometimes you have one app that had a lot migrations in development | ||
process. And this migrations could be deleted, because anybody will need | ||
this in the future. | ||
|
||
Soo, could be stressfull delete the files, reset the database and create | ||
the first migration again ... to start to developer again and bla bla | ||
bla ... | ||
|
||
Because this, I made this command to reset the migrations and start the | ||
first migration. | ||
|
||
I hope be usefull to you 2 :D | ||
|
||
To install | ||
---------- | ||
|
||
:: | ||
|
||
pip install django-reset-migrations | ||
|
||
Install package in your INSTALL\_APPS | ||
|
||
:: | ||
|
||
settings.py | ||
|
||
INSTALL_APPS = ( | ||
... | ||
'resetmigrations', | ||
..... | ||
) | ||
|
||
Usage | ||
----- | ||
|
||
:: | ||
|
||
python manage.py reset_migration crm | ||
|
||
or | ||
|
||
python manage.py reset_migration app1 app2 | ||
|
||
or | ||
|
||
python manage.py reset_migration app1 app2 --cached | ||
|
||
Options | ||
------- | ||
|
||
**--cached**: Don´t delete the migrations files in apps |
File renamed without changes.
Empty file.
Empty file.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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