Opened 9 years ago
Closed 9 years ago
#25855 closed Cleanup/optimization (fixed)
Improve runserver migration notification output.
Reported by: | Keryn Knight | Owned by: | Emre Yılmaz |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | django@…, hello@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Firstly, it uses the word "app" when it's actually over the whole project, and may span multiple apps, to use the Django nomenclature.
Additionally, I think it would be nicer to know what might need applying. At the very least, the number should be easy enough to ascertain (len(plan)
I'd assume), changing the message to something like:
You have 3 unapplied migrations; your project may not work correctly until apps [auth, bob, myapp] have their migrations applied.
would overall be preferable; the names can I think be gained via sorted(set(x[0].app_label for x in plan))
Could be easy pickings
if accepted.
Attachments (2)
Change History (13)
comment:1 by , 9 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 9 years ago
Easy pickings: | set |
---|
comment:3 by , 9 years ago
Cc: | added |
---|
Related pull request is on github:
https://github.com/django/django/pull/5765
by , 9 years ago
Attachment: | 0001-Fixed-25855-Added-more-accurate-info-to-migration.diff added |
---|
Patch for ticket #25855
comment:4 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:5 by , 9 years ago
Has patch: | set |
---|---|
Needs tests: | set |
To be seen if tests are doable in this part of the code.
comment:6 by , 9 years ago
Couldn't find a good way to test this with the current test structure. Any starting point?
comment:7 by , 9 years ago
It might be possible to instanciate a runserver Command and to call check_migrations
without running the command itself.
comment:8 by , 9 years ago
Just added the related unit tests and updated the pull request on github:
by , 9 years ago
Attachment: | 0001-Fixed-25855-Added-more-accurate-info-to-migration.diff added |
---|
comment:9 by , 9 years ago
Easy pickings: | unset |
---|---|
Needs tests: | unset |
Don't forget to uncheck the appropriate ticket flags after updating a patch ("Needs tests" in this case). Also, you don't need to add a patch on the ticket when you also send a pull request. Thanks!
More accurate messages (when possible) are always welcome.