Using a fork of someone else's code, I added a model field and did the usual auto migration:
~ $ django_admin.py migrate mezzanine_slides --auto
You cannot use automatic detection, since the previous migration does not have this whole app frozen.
Either make migrations using '--freeze mezzanine_slides' or set 'SOUTH_AUTO_FREEZE_APP = True' in your settings.py.
I tried the obvious options using the hint to no avail, and got nowhere from the documentation.
OK, with some trial and error: I created a 'frozen migration' thus:
~ $ django_admin.py schemamigration --freeze mezzanine_slides mezzanine_slides freeze --empty
Created 0002_freeze.py. You must now edit this migration and add the code for each direction.
Then I edited the resulting migration and deleted my added field so that:
! $ django_admin.py schemamigration mezzanine_slides --auto
+ Added field caption on mezzanine_slides.Slide
Created 0003_auto__add_field_slide_caption.py. You can now apply this migration with: ./manage.py migrate mezzanine_slides
with that done, the migration worked fine.
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