diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/backends/mysql/base.py | 1 | ||||
| -rw-r--r-- | django/db/backends/mysql/introspection.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py index 393af224e4..a7fe9b6104 100644 --- a/django/db/backends/mysql/base.py +++ b/django/db/backends/mysql/base.py @@ -178,6 +178,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): supports_date_lookup_using_string = False can_introspect_binary_field = False can_introspect_boolean_field = False + can_introspect_small_integer_field = True supports_timezones = False requires_explicit_null_ordering_when_grouping = True allows_auto_pk_0 = False diff --git a/django/db/backends/mysql/introspection.py b/django/db/backends/mysql/introspection.py index 14aea3b475..9b1a9a319b 100644 --- a/django/db/backends/mysql/introspection.py +++ b/django/db/backends/mysql/introspection.py @@ -21,7 +21,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): FIELD_TYPE.INT24: 'IntegerField', FIELD_TYPE.LONG: 'IntegerField', FIELD_TYPE.LONGLONG: 'BigIntegerField', - FIELD_TYPE.SHORT: 'IntegerField', + FIELD_TYPE.SHORT: 'SmallIntegerField', FIELD_TYPE.STRING: 'CharField', FIELD_TYPE.TIME: 'TimeField', FIELD_TYPE.TIMESTAMP: 'DateTimeField', |
