summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
Diffstat (limited to 'django/core')
-rw-r--r--django/core/management/commands/inspectdb.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/core/management/commands/inspectdb.py b/django/core/management/commands/inspectdb.py
index 73e8a19e76..f9b4bfb477 100644
--- a/django/core/management/commands/inspectdb.py
+++ b/django/core/management/commands/inspectdb.py
@@ -247,6 +247,9 @@ class Command(BaseCommand):
if field_type == 'CharField' and row.internal_size:
field_params['max_length'] = int(row.internal_size)
+ if field_type in {'CharField', 'TextField'} and row.collation:
+ field_params['db_collation'] = row.collation
+
if field_type == 'DecimalField':
if row.precision is None or row.scale is None:
field_notes.append(