#23405: Blank-able CharFields require default=''
----------------------------+--------------------
     Reporter:  yuvadm      |      Owner:  nobody
         Type:  Bug         |     Status:  new
    Component:  Migrations  |    Version:  1.7
     Severity:  Normal      |   Keywords:
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0           |      UI/UX:  0
----------------------------+--------------------
 There's a weird behavior in Django 1.7 migrations as opposed to 1.6 +
 South.

 Consider a simple blank-able CharField:

 {{{
 comment = models.CharField(max_length=20, blank=True)
 }}}

 In Django 1.6 + South, adding a migration to add this field would auto-
 generate `default=''` in the migration. In Django 1.7 the migration now
 throws: "You are trying to add a non-nullable field 'test' to question
 without a default".

 My understanding is that this is the proper convention for blank-able
 fields, and in that case the migrations need to support it properly.

--
Ticket URL: <https://code.djangoproject.com/ticket/23405>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.efae9b8b3cd21780aebdd8e8092b2866%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to