|
|
@ -112,7 +112,7 @@ namespace SqlSugar |
|
|
|
.Where(ec => !dbColumns.Any(dc => dc.DbColumnName.Equals(ec.OldDbColumnName, StringComparison.CurrentCultureIgnoreCase))) |
|
|
|
.Where(ec => |
|
|
|
dbColumns.Any(dc => dc.DbColumnName.Equals(ec.DbColumnName) |
|
|
|
&& ((ec.Length != dc.Length &&!PubMethod.GetUnderType(ec.PropertyInfo).IsEnum&& PubMethod.GetUnderType(ec.PropertyInfo).IsIn(PubConst.StringType)) || |
|
|
|
&& ((ec.Length != dc.Length &&!PubMethod.GetUnderType(ec.PropertyInfo).IsEnum()&& PubMethod.GetUnderType(ec.PropertyInfo).IsIn(PubConst.StringType)) || |
|
|
|
ec.IsNullable != dc.IsNullable || |
|
|
|
IsSamgeType(ec, dc)))).ToList(); |
|
|
|
var renameColumns = entityColumns |
|
|
@ -222,7 +222,7 @@ namespace SqlSugar |
|
|
|
ColumnDescription = item.ColumnDescription, |
|
|
|
Length = item.Length |
|
|
|
}; |
|
|
|
if (propertyType.IsEnum) |
|
|
|
if (propertyType.IsEnum()) |
|
|
|
{ |
|
|
|
result.DataType = this.Context.Ado.DbBind.GetDbTypeName(item.Length>9?PubConst.LongType.Name:PubConst.IntType.Name); |
|
|
|
} |
|
|
@ -237,7 +237,7 @@ namespace SqlSugar |
|
|
|
{ |
|
|
|
var propertyType = PubMethod.GetUnderType(ec.PropertyInfo); |
|
|
|
var properyTypeName = string.Empty; |
|
|
|
if (propertyType.IsEnum) |
|
|
|
if (propertyType.IsEnum()) |
|
|
|
{ |
|
|
|
properyTypeName = this.Context.Ado.DbBind.GetDbTypeName(ec.Length > 9 ? PubConst.LongType.Name : PubConst.IntType.Name); |
|
|
|
} |
|
|
|