Skip to content

Commit be36161

Browse files
committed
fix sql
1 parent 9c3be2b commit be36161

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mssql/schema.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,16 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
108108
sql_alter_column_comment = """IF NOT EXISTS (SELECT NULL FROM INFORMATION_SCHEMA.COLUMNS i
109109
INNER JOIN sys.columns t ON t.name = i.COLUMN_NAME
110110
LEFT JOIN sys.extended_properties ep ON t.object_id = ep.major_id
111-
WHERE (ep.name = N'MS_Description' AND ep.minor_id = column_id))
111+
WHERE (ep.name = N'MS_Description' AND ep.minor_id = 2))
112112
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = %(comment)s,
113113
@level0type = N'SCHEMA', @level0name = N'dbo',
114114
@level1type = N'TABLE', @level1name = %(table)s,
115-
@level2type = 'COLUMN', @level2name = %(column)s
115+
@level2type = N'COLUMN', @level2name = %(column)s
116116
ELSE
117117
EXECUTE sp_updateextendedproperty @name = N'MS_Description', @value = %(comment)s,
118118
@level0type = N'SCHEMA', @level0name = N'dbo',
119119
@level1type = N'TABLE', @level1name = %(table)s,
120-
@level2type = 'COLUMN', @level2name = %(column)s; """
120+
@level2type = N'COLUMN', @level2name = %(column)s; """
121121

122122
_deferred_unique_indexes = defaultdict(list)
123123

0 commit comments

Comments
 (0)