mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #5725 -- Fixed varchar column size introspection for MySQL
Thanks ferdonline for the initial patch and Karen Tracey for the related post on django-users.
This commit is contained in:
@@ -89,6 +89,11 @@ class IntrospectionTests(six.with_metaclass(IgnoreNotimplementedError, TestCase)
|
||||
[datatype(r[1], r) for r in desc],
|
||||
['IntegerField', 'CharField', 'CharField', 'CharField', 'BigIntegerField']
|
||||
)
|
||||
# Check also length of CharFields
|
||||
self.assertEqual(
|
||||
[r[3] for r in desc if datatype(r[1], r) == 'CharField'],
|
||||
[30, 30, 75]
|
||||
)
|
||||
|
||||
# Oracle forces null=True under the hood in some cases (see
|
||||
# https://docs.djangoproject.com/en/dev/ref/databases/#null-and-empty-strings)
|
||||
|
||||
Reference in New Issue
Block a user