Tom Evans
unread,Dec 15, 2017, 6:38:49 AM12/15/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Hi all
I'm updating a project from Django 1.8 to 1.11, however the migrations
which ran correctly under 1.8 now raise a CircularDependencyError for
(effortless_auth.0001_initial, app.0028_create_south_korea_data_set,
effortless_auth.0003_add_dev_group,
app.0027_create_effortless_verticals), which I'll summarise:
effortless_auth.0001_initial
Depends:
auth.__first__, places.__first__, auth.0006_require_contenttypes_0002
Adds:
AccountManager, DataSetType, PropValue, SpeedTestResult,
Vertical -> no FKs outside of app
GroupExtension -> (modified after creation to add fk to auth.Group)
PropDefinition -> fk to auth.Group
UserEvent -> fk to auth.User (settings.AUTH_USER_MODEL)
UserProp -> fk to auth.User (settings.AUTH_USER_MODEL)
Modifies:
GroupExtension -> add fk to auth.Group
app.0028_create_south_korea_data_set
Depends:
effortless_auth.003_add_dev_group
Runs:
Creates DataSetType instance
effortless_auth.0003_add_dev_group
Depends:
effortless_auth.0002_create_custom_content_group
Runs:
Creates and populates a Group and GroupExtension
app.0027_create_effortless_verticals
Depends:
effortless_auth.003_add_dev_group
Runs:
Creates 4 Vertical instances
I do not see what is circular from this, the graph should surely be:
auth.__first__
auth....
auth.0006
effortless_auth.0001
..
effortless_auth.0003
...
app.0027
app.0028
Why does this now confuse Django? I have a feeling this is due to
swappable models for auth (which we do not use, this project was
started with AUTH_USER_MODEL unset, but another project which re-uses
some of our libraries does do).
I can share more of the migrations, there is some additional
complexity I have skipped over because effortless_auth used to be part
of "app" and 'app' has had migrations squashed in the past, so many of
these migrations have "replaces" attributes also.
Cheers
Tom