I would like to completely empty the entire database, restoring it to the way it was when I just created it, using Django's manage.py
. Possible?
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With