Update 人大金仓 CodeFirst

This commit is contained in:
sunkaixuan 2023-12-11 15:37:04 +08:00
parent 882bdfb290
commit cbcfcbd8c9

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, "");