Update AddColumn

This commit is contained in:
sunkaixuan
2023-07-03 20:09:58 +08:00
parent ce07a7ff10
commit edf7f4f37b

View File

@@ -660,6 +660,10 @@ namespace SqlSugar
string columnName = this.SqlBuilder.GetTranslationColumnName(columnInfo.DbColumnName);
tableName = this.SqlBuilder.GetTranslationTableName(tableName);
string dataType = columnInfo.DataType;
if (dataType.EqualCase("varchar")&&this.Context.CurrentConnectionConfig?.MoreSettings?.SqlServerCodeFirstNvarchar == true)
{
dataType = "nvarchar";
}
string dataSize = GetSize(columnInfo);
string nullType = columnInfo.IsNullable ? this.CreateTableNull : CreateTableNotNull;
string primaryKey = null;