Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mssql/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,8 @@ def add_field(self, model, field):
# It might not actually have a column behind it
if definition is None:
return
if col_type_suffix := field.db_type_suffix(connection=self.connection):
definition += f" {col_type_suffix}"
# Remove column type from definition if field is generated
if (django_version >= (5,0) and field.generated):
definition = definition[definition.find('AS'):]
Expand Down
1 change: 0 additions & 1 deletion testapp/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@
'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_lookup_name_sql_injection',
'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_lookup_name_sql_injection',
'schema.tests.SchemaTests.test_autofield_to_o2o',
'schema.tests.SchemaTests.test_add_auto_field',
'prefetch_related.tests.PrefetchRelatedTests.test_m2m_prefetching_iterator_with_chunks',
'migrations.test_operations.OperationTests.test_create_model_with_boolean_expression_in_check_constraint',
'queries.test_qs_combinators.QuerySetSetOperationTests.test_union_in_subquery_related_outerref',
Expand Down