mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-01 19:15:10 +08:00
Optimize Oracle CodeFirst
This commit is contained in:
parent
ac836a7a28
commit
9201a72a57
@ -580,6 +580,7 @@ WHERE table_name = '"+tableName+"'");
|
||||
{
|
||||
foreach (var item in columns)
|
||||
{
|
||||
ConvertCreateColumnInfo(item);
|
||||
if (item.DbColumnName.Equals("GUID", StringComparison.CurrentCultureIgnoreCase) && item.Length == 0)
|
||||
{
|
||||
item.Length = 50;
|
||||
@ -631,6 +632,15 @@ WHERE table_name = '"+tableName+"'");
|
||||
}
|
||||
}
|
||||
}
|
||||
private static void ConvertCreateColumnInfo(DbColumnInfo x)
|
||||
{
|
||||
string[] array = new string[] { "int"};
|
||||
if (array.Contains(x.DataType?.ToLower()))
|
||||
{
|
||||
x.Length = 0;
|
||||
x.DecimalDigits = 0;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user