提交 136d9969 编写于 作者: S serge-rider

#5386 SQL Server: COLLATE in DDL


Former-commit-id: 65cacc0d
上级 ef1a3430
......@@ -60,6 +60,13 @@ public class SQLServerTableColumnManager extends SQLTableColumnManager<SQLServer
}
};
protected final ColumnModifier<SQLServerTableColumn> CollateModifier = (monitor, column, sql, command) -> {
String collationName = column.getCollationName();
if (!CommonUtils.isEmpty(collationName)) {
sql.append(" COLLATE ").append(collationName);
}
};
protected final ColumnModifier<SQLServerTableColumn> SQLServerDefaultModifier = (monitor, column, sql, command) -> {
if (!column.isPersisted()) {
DefaultModifier.appendModifier(monitor, column, sql, command);
......@@ -79,7 +86,7 @@ public class SQLServerTableColumnManager extends SQLTableColumnManager<SQLServer
protected ColumnModifier[] getSupportedModifiers(SQLServerTableColumn column, Map<String, Object> options)
{
return new ColumnModifier[] {DataTypeModifier, IdentityModifier, SQLServerDefaultModifier, NullNotNullModifier};
return new ColumnModifier[] {DataTypeModifier, IdentityModifier, CollateModifier, SQLServerDefaultModifier, NullNotNullModifier};
}
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册