Re: Altering migration operations depending django.Version (3rd party apps)

2015-04-22 Thread Tim Graham
makemigrations shouldn't automatically add model managers to migrations files. Did you opt them in with `use_in_migrations = True`? If so, I believe you have to drop compatibility with Django 1.7 (i.e. are you limited to the migrations feature set of the lowest version of Django you wish to sup

Re: Altering migration operations depending django.Version (3rd party apps)

2015-04-22 Thread Patrick Craston
Hi Tim If I create a migration on the lowest Django version I wish to support (say 1.7), it will not add the AlterModelManager operation to the migration. If someone installs the app on Django 1.8, the migration will run fine. However, every time the user runs "migrate" after that it will comp

Re: Altering migration operations depending django.Version (3rd party apps)

2015-04-22 Thread Tim Graham
The recommended way is to run makemigrations with the lowest version of Django you wish to support. As this recommendation hasn't been tested, let us know if you encounter any problems with it. A potential problem that comes to mind is if you have an EmailField which had its default max_length

Altering migration operations depending django.Version (3rd party apps)

2015-04-22 Thread Patrick Craston
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 AlterF