Fixed issues with custom user model in migrations.