"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?
Yes you can delete the migrations in django but it can create following errors. If you change the model again and create migration, it will have all the information from the beginning of model creation so when you migrate the migration in db you will get the error that “this table or column already present in table”.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With