Converting a south 0.7 migration back to 0.6

I had a minor fight with south earlier today, where someone had created a migration with south 0.7, and I needed it to work with south 0.6.

Needless to say that it would be a pain to manually convert it from the better 0.7 format back into 0.6, so I wrote a fairly small python script, that does the job.

Don’t blame me if the script causes your data to be erased or tables to be dropped. It’s ment as a guideline, although it worked for me out of the box.

YMMV.

Usage: python <south_07to06.py> <path/to/migration.py>