Opened 10 years ago

Closed 10 years ago

#21968 closed Bug (fixed)

Django doesn't detect initial migration when an app is a dependency

Reported by: Ubercore Owned by: Andrew Godwin <andrew@…>
Component: Migrations Version: dev
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no


I have app A, and app B, neither of which have migrations defined (new project, new apps). app A imports a model as an FK from app B. I make app A's migrations with ./ makemigrations app_a , and app_a/migrations/ is created. In it, app B is marked as a dependency: dependencies = [('app_b', '__first__'),] . If I try to run ./ makemigrations app_b , I get No changes detected in app 'app_b'

If I remove app A's migrations entirely, and re-run app B's makemigrations, I get an initial migration as I would expect.

Change History (4)

comment:1 Changed 10 years ago by Ubercore

Type: UncategorizedBug

comment:2 Changed 10 years ago by Ubercore

Needs tests: set

comment:3 Changed 10 years ago by Aymeric Augustin

Triage Stage: UnreviewedAccepted

comment:4 Changed 10 years ago by Andrew Godwin <andrew@…>

Owner: set to Andrew Godwin <andrew@…>
Resolution: fixed
Status: newclosed

In 2085f53f567f7619ecf3eab93fdacab7a5991a11:

Fixed #21968: Bad detection of old-style apps to add initial migration

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