{{{
diff --git a/django/db/migrations/graph.py b/django/db/migrations/graph.py
index aba8259..db8a529 100644
--- a/django/db/migrations/graph.py
+++ b/django/db/migrations/graph.py
@@ -367,9 +367,7 @@ class MigrationGraph:
plan = []
for node in nodes:
for migration in self.forwards_plan(node):
- if migration not in plan:
- if not at_end and migration in nodes:
- continue
+ if migration in plan or at_end or migration not in nodes:
plan.append(migration)
project_state = ProjectState(real_apps=real_apps)
for node in plan:
}}}
I think believe the correct logic should be:
{{{
if migration not in plan and (at_end or migration not in nodes):
plan.append(migration)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29180>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Collin Anderson (added)
* needs_tests: 0 => 1
Comment:
https://github.com/django/django/pull/9742
--
Ticket URL: <https://code.djangoproject.com/ticket/29180#comment:1>
* stage: Unreviewed => Accepted
* type: Uncategorized => Bug
--
Ticket URL: <https://code.djangoproject.com/ticket/29180#comment:2>
* cc: Carlton Gibson (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/29180#comment:3>
* needs_tests: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/29180#comment:4>
Comment (by Carlton Gibson <carlton.gibson@…>):
In [changeset:"4d420a53cf9796ce635d16f6832b6c5f1bb7dc8a" 4d420a53]:
{{{
#!CommitTicketReference repository=""
revision="4d420a53cf9796ce635d16f6832b6c5f1bb7dc8a"
Refs #29180 -- Added MigrationGraph._generate_plan() for testing.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29180#comment:5>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"5b083a824ea90fb1705bd0c208245ff92a5237d8" 5b083a82]:
{{{
#!CommitTicketReference repository=""
revision="5b083a824ea90fb1705bd0c208245ff92a5237d8"
Fixed #29180 -- Fixed a regression where migrations already in the plan
were readded.
Regression in a38ae914d89809aed6d79337b74a8b31b6d3849a.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29180#comment:6>