Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#25044 closed Bug (fixed)

Renaming a ManyToManyField's through table creates a broken migration

Reported by: Ian Foote Owned by: Vytis Banaitis
Component: Migrations Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I've created a minimal example demonstating the broken migration at https://github.com/Ian-Foote/django-bug-sandbox/pull/1.

Change History (13)

comment:1 Changed 3 years ago by Ian Foote

Component: UncategorizedMigrations
Type: UncategorizedBug

comment:2 Changed 3 years ago by Tim Graham

Triage Stage: UnreviewedAccepted

comment:3 Changed 3 years ago by AndrewGrossman

Owner: changed from nobody to AndrewGrossman
Status: newassigned

comment:4 Changed 3 years ago by Sambhav Satija

Owner: changed from AndrewGrossman to Sambhav Satija

I'd like to take a stab at it for a couple of days.

comment:5 Changed 3 years ago by Sambhav Satija

Owner: Sambhav Satija deleted
Status: assignednew

Releasing the ticket since I haven't been able to find time to look at it.

comment:6 Changed 2 years ago by Tim Graham

Closed #26564 as a duplicate.

comment:7 Changed 2 years ago by Vytis Banaitis

Has patch: set
Owner: set to Vytis Banaitis
Status: newassigned

PR based on a fix in 107c9f5 for a similar problem.

comment:8 Changed 2 years ago by Tim Graham

Patch needs improvement: set

Comments for improvement on the PR.

comment:9 Changed 2 years ago by Vytis Banaitis

Patch needs improvement: unset

I have created a new PR, in which I've updated RenameModel operation to deal with M2M through.

comment:10 Changed 2 years ago by Simon Charette

Version: 1.8master

#22931 might also be solved by this change.

comment:11 Changed 2 years ago by Simon Charette

Triage Stage: AcceptedReady for checkin

comment:12 Changed 2 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In f1e408ff:

Fixed #25044 -- Fixed migrations for renaming ManyToManyField's through model.

comment:13 Changed 2 years ago by Tim Graham <timograham@…>

In b737c0f:

[1.10.x] Fixed #25044 -- Fixed migrations for renaming ManyToManyField's through model.

Backport of f1e408ff40d2c1753f92515c70a44634b4d47467 from master

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