Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django South - How do I reset migration history and start clean on Django app

This seems to be outdated as the reset command does not seem to be found using the version of South I am using, which is the most recent I believe.

Anyways, say you are in production and things get really messy. What is the best current way to start fresh with a Django app as far as cleaning up the migration history?

like image 682
Joker Avatar asked May 28 '13 20:05

Joker


1 Answers

Steps:

  1. Erase every /migrations folder inside your apps
  2. Go to the database and drop the south_migrationhistory table (or delete its rows)
  3. (Optional) Remove south from your installed apps (if you want to get rid of south, if not, leave it alone)

Done

Notice that you may drop the table or delete all its rows.

If you drop it you'll have to syncdb again.

Hope this helps!

like image 103
Paulo Bu Avatar answered Sep 21 '22 20:09

Paulo Bu