Synchronization code

This commit is contained in:
sunkaixuan 2023-12-11 15:39:41 +08:00
parent cbcfcbd8c9
commit 962486d283

View File

@ -462,6 +462,10 @@ WHERE tgrelid = '" + tableName + "'::regclass");
// dataType = "varchar";
//}
string dataSize = item.Length > 0 ? string.Format("({0})", item.Length) : null;
if (item.DecimalDigits > 0 && item.Length > 0 && dataType == "numeric")
{
dataSize = $"({item.Length},{item.DecimalDigits})";
}
string nullType = item.IsNullable ? this.CreateTableNull : CreateTableNotNull;
string primaryKey = null;
string addItem = string.Format(this.CreateTableColumn, this.SqlBuilder.GetTranslationColumnName(columnName.ToUpper(IsUpper)), dataType, dataSize, nullType, primaryKey, "");