diff --git a/django/db/backends/mysql/schema.py b/django/db/backends/mysql/schema.py index 4aa40f7cb57..4a618072345 100644 --- a/django/db/backends/mysql/schema.py +++ b/django/db/backends/mysql/schema.py @@ -27,8 +27,8 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): def skip_default(self, field): """ - MySQL doesn't accept default values for TEXT and BLOB types, and - implicitly treats these columns as nullable. + MySQL doesn't accept default values for some data types and implicitly + treats these columns as nullable. """ db_type = field.db_type(self.connection) return ( @@ -36,6 +36,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): db_type.lower() in { 'tinyblob', 'blob', 'mediumblob', 'longblob', 'tinytext', 'text', 'mediumtext', 'longtext', + 'json', } )