Fixed migration to run in projects that use a custom User model.

The migration now runs from scratch on projects using a custom Django 1.5 User model.