#26966: MySQL backend schema editor skip_default method requires update for MySQL 5.7 -------------------------------------+------------------------------------- Reporter: mcgeeco | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: 1.9 (models, ORM) | Keywords: mysql, mysql 5.7, Severity: Normal | jsonfield, backend, db Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Currently this method, [https://github.com/django/django/blob/1.10rc1/django/db/backends/mysql/schema.py#L28 django.db.backends.mysql.schema.DatabaseSchemaEditor.skip_default], checks for a certain group of field types (texts and blobs) to determine whether defaults are applicable at the database level. Since MySQL 5.7, there is one more which I believe needs to be added to this list - the new 'json' type. I discovered this while working with the [https://github.com/adamchainz/django-mysql/issues/312 django-mysql module]. In that module a default of `dict` is set at the Django model level but needs to be ignored for database operations. As far as I can see it should be a pretty straight forward fix as I can't see why it would interfere with the functionality for older versions of MySQL.
-- Ticket URL: <https://code.djangoproject.com/ticket/26966> 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/050.deda08000a1186eb4469410e4808f23c%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.