Skip to content

Commit bb2cb08

Browse files
committed
Fix alter comment behavior
1 parent 37d48d0 commit bb2cb08

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

mssql/schema.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,18 @@ def _alter_column_default_sql(self, model, old_field, new_field, drop=False):
171171
},
172172
params,
173173
)
174-
174+
175+
def _alter_column_comment_sql(self, model, new_field, new_type, new_db_comment):
176+
return (
177+
self.sql_alter_column_comment
178+
% {
179+
"table": self.quote_name(model._meta.db_table),
180+
"column": new_field.column,
181+
"comment": self._comment_sql(new_db_comment),
182+
},
183+
[],
184+
)
185+
175186
def _alter_column_null_sql(self, model, old_field, new_field):
176187
"""
177188
Hook to specialize column null alteration.

0 commit comments

Comments
 (0)