#23405: Blank-able CharFields require default=''
----------------------------+------------------------------------
Reporter: yuvadm | Owner: coldmind
Type: Bug | Status: assigned
Component: Migrations | Version: 1.7
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+------------------------------------
Comment (by andrewgodwin):
Thinking about this again, `needs_default` isn't quite enough as you also
need to give the database a default value to work with when there's none
provided, and we don't have provision for that; plus, the schema backends
aren't clever enough to check for this (currently, they use
field.empty_strings_allowed).
Thus, the patch should probably just fix the autodetector to skip fields
with `empty_strings_allowed` declared, which should get the intended
result.
--
Ticket URL: <https://code.djangoproject.com/ticket/23405#comment:18>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.36a64e4a83eb7a104f00c7e4ac2b6185%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.