20👍
✅
What you can do to flush the DB and not have any migrate(south) problem afterwards is:
first, reset the data from the DB:
python manage.py flush
second, fake the migrations that are already applied:
python manage.py migrate --fake
third, if you have some fixture to load:
python manage.py loaddata my_sweet_json_file
2👍
Yes, you can use flush.
That will reset and restore everything in your entire database, regardless of which app or project the models are in. If you have a few databases, you can specify a single one in particular by using the --database
switch
Examples:
python manage.py flush
python manage.py flush --database mydatabase
Source:stackexchange.com