mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 18:22:23 +08:00
Update CodeFirst 人大金仓
This commit is contained in:
@@ -431,6 +431,8 @@ WHERE tgrelid = '" + tableName + "'::regclass");
|
|||||||
{
|
{
|
||||||
foreach (var item in columns)
|
foreach (var item in columns)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
ConvertCreateColumnInfo(item);
|
||||||
if (item.DbColumnName.Equals("GUID", StringComparison.CurrentCultureIgnoreCase) && item.Length == 0)
|
if (item.DbColumnName.Equals("GUID", StringComparison.CurrentCultureIgnoreCase) && item.Length == 0)
|
||||||
{
|
{
|
||||||
item.Length = 10;
|
item.Length = 10;
|
||||||
@@ -562,6 +564,16 @@ WHERE tgrelid = '" + tableName + "'::regclass");
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private static void ConvertCreateColumnInfo(DbColumnInfo x)
|
||||||
|
{
|
||||||
|
string[] array = new string[] { "int4", "text", "int2", "int8", "date", "bit", "text", "timestamp" };
|
||||||
|
|
||||||
|
if (array.Contains(x.DataType?.ToLower()))
|
||||||
|
{
|
||||||
|
x.Length = 0;
|
||||||
|
x.DecimalDigits = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user