Skip to content

Failing migration with existing apps #3

@SebastianKapunkt

Description

@SebastianKapunkt

Problem:
When running the migration the migration will fail with this error:

django.db.migrations.exceptions.InconsistentMigrationHistory: Migration app_name.0002_auto_XXXX is applied before its dependency mailauth_user.0001_initial on database 'default'.

Guess
its happening because an existing app is referencing in a migration the to=settings.AUTH_USER_MODEL and therefore the non existing user migration.

Expected behaviour
The migration should always run no matter what exists before.

My Workaround
I just delete AUTH_USER_MODEL = 'mailauth_user.EmailUser' for the duration of the migration

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions