﻿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
30390	makemigrations requires default when adding non-nullable field even when there are no rows.	Neil du Toit	Jay Welborn	"When adding a non-nullable field to a model, and then running 
    python manage.py makemigrations <appname>
Django will respond with the following:

""You are trying to add a non-nullable field <field> to <model> 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
Select an option: ""

This is quite frustrating when there are no existing rows. It requires more effort and, more importantly, leads to confusion about what migrations are doing. I frequently go back and check the database for my own sanity after seeing this message.

Desired behavior:
If there are no rows then there is no need for a default. This message should not be displayed and the migration should simply be run.
"	Cleanup/optimization	closed	Migrations	dev	Normal	wontfix	makemigrations default null		Accepted	0	0	0	0	1	0
