#29180: Makemigrations autodetector ignoring existing migrations -------------------------------------------+------------------------ Reporter: Collin Anderson | Owner: nobody Type: Uncategorized | Status: new Component: Migrations | Version: master Severity: Release blocker | Keywords: Triage Stage: Unreviewed | Has patch: 1 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------------------------+------------------------ I don't have a minimal case to reproduce this issue, but I've bisected the issue to a38ae914 (#28996) and narrowed it down to this change:
{{{ 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. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/057.1126d40dab95dcd0eaeb4d7ed0a4f385%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.