Opened 12 years ago
Closed 12 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 , 12 years ago
| Has patch: | set |
|---|---|
| Owner: | set to |
| Status: | new → assigned |
comment:2 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
I opened a pull request at https://github.com/django/django/pull/1636