#32900: Migrations questioner uses bad grammar
-------------------------------------+-------------------------------------
Reporter: Christian Ullrich | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Migrations | Version: 3.2
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Christian Ullrich:
Old description:
> 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 django.db.migrations.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.
New description:
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.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/32900#comment:1>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.3d746f841d27f2c4a59513101c91af13%40djangoproject.com.