how to restore dropped table with django-south?

Claudiu picture Claudiu · Mar 16, 2011 · Viewed 7.3k times · Source

I wanted to clear out a table in my DB, so I dropped the table. Normally I would do manage.py syncdb to re-create it. However, the answer here says not to use syncdb anymore. So, what do I do instead?

Answer

lehins picture lehins · Nov 23, 2012

It's a pretty late response but for people who will run into the same issue (like I did).

Normally to drop the db_tables for the app that is managed by south you should use:

python manage.py migrate appname zero

But if you dropped them manually in the db let south know about it

python manage.py migrate appname zero --fake

And of course to recreate the tables

python manage.py migrate appname