preserve data when migrating ForeignKey to ManyToManyField

2015-07-14 Thread A Lee
I'd like to change a ForeignKey field into a ManyToManyField, preserving existing data by creating entries in the many-to-many through table. Running makemigrations after changing the model class creates a migration that executes a RemoveField on the existing ForeignKey field and then an AddFie

Re: Django 1.8 data migrations not able to locate related collections

2015-04-17 Thread A Lee
Hi Markus, thanks for the fast response! Yup, that did the trick. I had to do some manual copypasta into the stable/1.8.x branch to get it to run but it appears that was the issue. On Fri, Apr 17, 2015 at 9:45 AM, Markus Holtermann wrote: > Hi A Lee, > > I think I've seen that o

Django 1.8 data migrations not able to locate related collections

2015-04-16 Thread A Lee
Hello, After upgrading to 1.8 from 1.7.7 our tests are now unable to create test data via data migrations and complain about related collections not existing as attributes for some but not all models (exception stack trace at https://travis-ci.org/virtualcommons/vcweb). It appears to succeed at