Opened 11 years ago

Closed 11 years ago

#21114 closed Bug (fixed)

Migrations must not have a dependency to themself

Reported by: Markus Holtermann Owned by: Markus Holtermann
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Given two models A and B where B has a FKField pointing to A, the autodetector added a dependency to the migration itself. Thus the migration can never be resolved. This dependency is not even necessary as CreateModel first creates the model A and then B (which can directly point to A)

If additionally A has a FKField to B, the same holds: the first dependency must not contain a dependency to itself while the second (adding the FKField to model A) must depend on the first one.

Change History (2)

comment:1 by Markus Holtermann, 11 years ago

Has patch: set
Owner: set to Markus Holtermann
Status: newassigned

comment:2 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In 5a424c2393bf9f2524b8075723e90298c1297846:

Fixed #21114 -- Migrations must not have a dependency to themselves.

Note: See TracTickets for help on using tickets.
Back to Top