1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Made inspectdb used Cursor.description.display_size for CharFields' max_length.

internal_size is size for fixed-size types not for char types.
This commit is contained in:
Mariusz Felisiak
2022-12-08 09:00:35 +01:00
committed by GitHub
parent 95a101a690
commit cbc0fb3705
7 changed files with 19 additions and 12 deletions

View File

@@ -132,7 +132,7 @@ class IntrospectionTests(TransactionTestCase):
)
self.assertEqual(
[
r[3]
r[2]
for r in desc
if connection.introspection.get_field_type(r[1], r) == "CharField"
],