#32900: Migrations questioner uses bad grammar
------------------------------------------------+------------------------
Reporter: Christian Ullrich | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: 3.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/32900>
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/053.9629f5d6362a82e810c9c4f6b7372d8e%40djangoproject.com.