Hi all

I'm creating a migration for a 3rd party app that needs to work with 
current and previous Django versions. In Django 1.8 "makemigrations" adds a 
"AlterModelManager" operation which only works with Django 1.8 and later 
since AlterModelManager didn't exist before. It will also do an AlterField 
to convert the IPAddressField to GenericIPAddressField.

I currently have this: 
https://gist.github.com/anonymous/e4d7f4f6dfd48988640d

Basically I append to migrations operations if django.VERSION >= (1,8). But 
as was mentioned in #django IRC, if the user applies the app's migration in 
Django 1.7 those migrations don't get applied. If the user then upgrades to 
Django 1.8, the user would miss those migrations?

Is there a recommended way of altering migration operations depending on 
django.VERSION? If yes, do you think it might be worth adding a note in the 
documentation?

Thank you!
Patrick

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/ed634f4d-5993-4343-8aae-a5069d833ed2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to