moving from Django 1.6 and south to Django 1.8 -- auth migrations not applied

233 views
Skip to first unread message

Scott Hostovich

unread,
Apr 20, 2015, 4:19:56 PM4/20/15
to django...@googlegroups.com
I moving from Django 1.6 and south to Django 1.8. I followed the instructions at https://docs.djangoproject.com/en/1.8/topics/migrations/#upgrading-from-south and things seemed to work fine. Then I noticed that the auth migrations did not get applied to the database (https://github.com/django/django/tree/1.8/django/contrib/auth/migrations).

Anyone else encounter this?

Scott Hostovich

unread,
Apr 21, 2015, 11:42:45 AM4/21/15
to django...@googlegroups.com
I'm using a custom user model, so it seems that migration operations like the following are ignored silently:

migrations.AlterField(
    model_name='user',
    name='email',
    field=models.EmailField(max_length=254, verbose_name='email address', blank=True),
),

Tim Graham

unread,
Apr 21, 2015, 12:16:31 PM4/21/15
to django...@googlegroups.com
Yes, you should generate and apply migrations for the app that contains your custom user model. Since you skipped Django 1.7, you'll have to edit the automatically generated initial migration for that app and change EmailField max_length to 75 since that matches your schema. Then you can auto-generate a second migration to update the max_length to 254.

Scott Hostovich

unread,
Apr 21, 2015, 12:34:14 PM4/21/15
to django...@googlegroups.com
I see, thank you.
Reply all
Reply to author
Forward
0 new messages