10
votes

"South" is the tool that automates database migrations for Django.

How can I "abandon" or "delete" a pending django south migration? I made a mistake and briefly asked django to make an impossible constraint. I thus can't get past step 09 to get to step 10:

 # python2.7 manage.py migrate --list

 django_authopenid
  (*) 0001_initial
 ...

 mymodule
  (*) 0001_initial
  (*) 0008_auto__add_mystuff__chg_field_facetanswer_answer_note__del_field_facetq
  ...
  ( ) 0009_auto__add_module_redit__add_unique_mystuff_who__chg_field_product_desc
  ( ) 0010_auto__del_unique_mystuff_who

If i could simply abandon step 09 and 10, I could run 'python2.7 manage.py schemamigration --auto' again and be up and running. How can I get past the mistake? I could comment out the 'impossible' lines in migration 08's python file, but I could see that causing problems.

Related but not quite on point is What's the recommended approach to resetting migration history using Django South?

1

1 Answers

11
votes

There is no * around 0009 and 0010 schemamigration, meaning they haven't been applied. You can simply delete them as they mean nothing to the DB right now.

p.s. To make sure open your DB and see if there are any new changes