Synchronization code

This commit is contained in:
sunkaixuan
2023-12-23 12:21:09 +08:00
parent 265d90f549
commit f24a0b3a8d
2 changed files with 20 additions and 0 deletions

View File

@@ -524,6 +524,7 @@ WHERE table_name = '" + tableName + "'");
{
foreach (var item in columns)
{
ConvertCreateColumnInfo(item);
if (item.DbColumnName.Equals("GUID", StringComparison.CurrentCultureIgnoreCase) && item.Length == 0)
{
item.Length = 10;
@@ -582,6 +583,15 @@ WHERE upper(t.TABLE_NAME) = upper('{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
}
}

View File

@@ -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
}
}