#32900 closed Cleanup/optimization (fixed)
Migrations questioner uses bad grammar
| Reported by: | Christian Ullrich | Owned by: | Mateo Radman |
|---|---|---|---|
| Component: | Migrations | Version: | 3.2 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
The interactive questioner, when it asks what to do about changes in nullability or adding a NOT NULL field, provides multiple options. Some of these speak to the user, some as the user.
One example of several:
You are trying to add a non-nullable field 'id' to mymodel without a default; we can't do that (the database needs something to populate existing rows). Please select a fix: 1) Provide a one-off default now (will be set on all existing rows with a null value for this column) 2) Quit, and let me add a default in models.py
In option 1, Django offers the user the choice of entering the default value. Option 2 instead is the user telling Django what to do.
Each time I read this, I'm asking myself who the "me" in option 2 is. The most egregious case is in InteractiveMigrationQuestioner.ask_not_null_alteration(): "[...] let me handle existing rows [...] (e.g. because you added a RunPython [...]". In this sentence, "me" and "you" are the same.
Fix: Either reword the "provide" options to say "Let me enter a one-off default now", or the "let me" options to the same style as the "provide" options. I am very much in favor of the latter because I think this "me, the user" style is terrible.
Change History (18)
comment:1 by , 4 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 4 years ago
| Easy pickings: | set |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
comment:3 by , 4 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:4 by , 4 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
PR is ready. Let me know if you have any suggestions regarding phrasing the questions.
comment:5 by , 4 years ago
| Has patch: | set |
|---|---|
| Resolution: | fixed |
| Status: | closed → new |
When adding a PR, the correct action is to check "Has patch" rather than close the ticket. See Triaging tickets and the "According to the ticket's flags, the next step(s) to move this issue forward are:" section of each open ticket.
comment:6 by , 4 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:7 by , 4 years ago
| Owner: | changed from to |
|---|
Muhammad, this ticket is already assigned to Mateo. Please try to find a ticket that is not assigned.
comment:8 by , 4 years ago
I think PR is ready to be merged. Thanks for everyone’s suggestions and involvement.
comment:9 by , 4 years ago
| Needs tests: | set |
|---|---|
| Patch needs improvement: | set |
comment:10 by , 4 years ago
| Needs tests: | unset |
|---|---|
| Patch needs improvement: | unset |
comment:11 by , 4 years ago
| Needs tests: | set |
|---|
comment:12 by , 4 years ago
| Needs tests: | unset |
|---|
comment:13 by , 4 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Thanks, this has also occurred to me. For the example you quoted in full, perhaps: "Quit, so that a default in models.py can be added later." And something similarly passive for the other cases, avoiding the use of "you" entirely.