mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #23357 -- Added small int introspection support to MySQL backend.
In the MySQL backend, updated the can_introspect_small_integer feature flag to True. In data_types_reverse, map FIELD_TYPE.SHORT to a SmallIntegerField. Added test to verify introspecting SmallIntegerFields and fixed existing tests influenced by this change.
This commit is contained in:
committed by
Simon Charette
parent
a81af7f49d
commit
f0d3dd4f04
@@ -59,7 +59,8 @@ class IntrospectionTests(TestCase):
|
||||
['AutoField' if connection.features.can_introspect_autofield else 'IntegerField',
|
||||
'CharField', 'CharField', 'CharField',
|
||||
'BigIntegerField' if connection.features.can_introspect_big_integer_field else 'IntegerField',
|
||||
'BinaryField' if connection.features.can_introspect_binary_field else 'TextField']
|
||||
'BinaryField' if connection.features.can_introspect_binary_field else 'TextField',
|
||||
'SmallIntegerField' if connection.features.can_introspect_small_integer_field else 'IntegerField']
|
||||
)
|
||||
|
||||
# The following test fails on Oracle due to #17202 (can't correctly
|
||||
@@ -80,7 +81,7 @@ class IntrospectionTests(TestCase):
|
||||
nullable_by_backend = connection.features.interprets_empty_strings_as_nulls
|
||||
self.assertEqual(
|
||||
[r[6] for r in desc],
|
||||
[False, nullable_by_backend, nullable_by_backend, nullable_by_backend, True, True]
|
||||
[False, nullable_by_backend, nullable_by_backend, nullable_by_backend, True, True, False]
|
||||
)
|
||||
|
||||
# Regression test for #9991 - 'real' types in postgres
|
||||
|
||||
Reference in New Issue
Block a user