Code

Opened 7 months ago

Closed 7 months ago

#21114 closed Bug (fixed)

Migrations must not have a dependency to themself

Reported by: MarkusH Owned by: MarkusH
Component: Migrations Version: master
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.

Attachments (0)

Change History (2)

comment:1 Changed 7 months ago by MarkusH

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Owner set to MarkusH
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 7 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 5a424c2393bf9f2524b8075723e90298c1297846:

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.