﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26594	Text in migration prompt is scary and (slightly) wrong	Mike Lissner	nobody	"I just did the following:

 - Converted a field to non-nullable in my model.
 - Created a migration
 - Had the following interaction:


{{{
You are trying to change the nullable field 'pacer_case_id' on docket to non-nullable 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)
 2) Ignore for now, and let me handle existing rows with NULL myself (e.g. because you added a RunPython or RunSQL operation to handle NULL values in a previous data migration)
 3) Quit, and let me add a default in models.py
Select an option: 1
Please enter the default value now, as valid Python
The datetime and django.utils.timezone modules are available, so you can do e.g. timezone.now()
>>> ''
}}}


You can see that I entered (blank) for all the null values.

Next, I went to the production server and started deploying the migration. This is when I wondered, wait, did I just set *every* value to blank, or just the null ones?

And I went and read the prompt from a moment ago and saw:


{{{
Provide a one-off default now (will be set on all existing rows)
}}}

(will be set on all existing rows)

WILL BE SET ON ALL EXISTING ROWS.

== WILL BE SET ON ALL EXISTING ROWS! ==

----

Well, that terrified me for a moment. 

I suggest we change this to say:

{{{
(will be set on all existing null-value rows)
}}}

Or something to that effect.
"	Cleanup/optimization	closed	Migrations	1.9	Normal	duplicate	terror		Unreviewed	0	0	0	0	0	0
