Joker
Joker

Reputation: 2239

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?

Upvotes: 8

Views: 6284

Answers (1)

Paulo Bu
Paulo Bu

Reputation: 29804

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!

Upvotes: 13

Related Questions