#32799: Inconsistency regarding the default value of CharField
-------------------------------+--------------------------------------
     Reporter:  Adam Sołtysik  |                    Owner:  nobody
         Type:  New feature    |                   Status:  closed
    Component:  Migrations     |                  Version:  3.2
     Severity:  Normal         |               Resolution:  wontfix
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * resolution:   => wontfix
 * component:  Database layer (models, ORM) => Migrations
 * type:  Uncategorized => New feature


Comment:

 IMO these are two different scenarios. The Django convention is to use the
 empty string, not `NULL`. For a string-based field with `null=False` you
 have one possible values for "no data" i.e. the empty string that's why
 Django uses it when value is not provided for a non-nullable string-based
 field.

 Migrations asks for a default value for **existing** rows when adding a
 non-nullable field to the model, and does it consistently for all type of
 fields. Folks can always type `''`, it's not much of a burden.

 You can start a discussion on DevelopersMailingList if you don't agree.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32799#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/065.af1aef21e82c4500bf35e2819c340812%40djangoproject.com.

Reply via email to