code optimization

This commit is contained in:
sunkaixuna
2022-01-09 15:06:06 +08:00
parent 416200e032
commit 149183fed8

View File

@@ -397,7 +397,7 @@ namespace SqlSugar
tableName = this.SqlBuilder.GetTranslationTableName(tableName); tableName = this.SqlBuilder.GetTranslationTableName(tableName);
foreach (var item in columns) foreach (var item in columns)
{ {
if (item.DataType == "decimal" && this.Context.CurrentConnectionConfig.DbType == DbType.SqlServer && item.DecimalDigits == 0 && item.Length == 0) if (item.DataType == "decimal" && item.DecimalDigits == 0 && item.Length == 0)
{ {
item.DecimalDigits = 4; item.DecimalDigits = 4;
item.Length = 18; item.Length = 18;