#23678: Database default not removed if default=None
-------------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Release blocker | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+------------------------
If you have a model field like `models.CharField(max_length=255,
blank=True, null=True, default=None)`, you will end up something like
`varchar(255) DEFAULT NULL` with MySQL. The `DEFAULT NULL` should be
dropped but isn't due to the `field.default is not None` check here:
https://github.com/django/django/blob/8d6e1afe0be0570253a508f43e2ef89ae640984e/django/db/backends/schema.py#L382
--
Ticket URL: <https://code.djangoproject.com/ticket/23678>
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/052.443fa63de2d6a5b82bd6bd4e0e4c85f7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.