#23341 closed Cleanup/optimization (fixed)
Better stacktrace error for makemigrations when migration references nonexistent migration(s)
| Reported by: | Raffaele Salmaso | Owned by: | nobody |
|---|---|---|---|
| Component: | Migrations | Version: | 1.7-rc-3 |
| Severity: | Normal | Keywords: | |
| Cc: | raffaele.salmaso@… | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | yes | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
When makemigrations fails to generate migration graph it raise a KeyError with a message
Dependency references nonexistent parent node %r
It whould be better if it shows even the failinig migration name
Change History (6)
comment:1 by , 11 years ago
| Cc: | added |
|---|---|
| Component: | Uncategorized → Migrations |
| Summary: | Better stacktrace error for makemigrations → Better stacktrace error for makemigrations when migration references nonexistent migration(s) |
comment:2 by , 11 years ago
comment:3 by , 11 years ago
| Has patch: | set |
|---|---|
| Needs tests: | set |
| Triage Stage: | Unreviewed → Accepted |
| Type: | Uncategorized → Cleanup/optimization |
comment:4 by , 11 years ago
Update PR:
- changed message from "Migration %s dependencies references nonexistent {parent,child} node %r" to "Migration %s dependencies references nonexistent {parent,child} node %r"
- added tests for missing {parent,child} nodes
For forwards_plan and backwards_plan I'll open a new ticket.
comment:5 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
PR against master https://github.com/django/django/pull/3100
PR against 1.7.x https://github.com/django/django/pull/3101
Changed messages from
"Dependency references nonexistent child node %r"
to
"In migration %s dependency references nonexistent child node %r"
and from
"Dependency references nonexistent parent node %r"
to
"In migration %s dependency references nonexistent parent node %r"