mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 17:48:11 +08:00
Update pgsql
This commit is contained in:
@@ -37,6 +37,11 @@ namespace SqlSugar
|
||||
ColumnDescription = item.ColumnDescription,
|
||||
Length = item.Length
|
||||
};
|
||||
if (propertyType == UtilConstants.DecType)
|
||||
{
|
||||
result.Scale = item.DecimalDigits;
|
||||
result.DecimalDigits = item.DecimalDigits;
|
||||
}
|
||||
GetDbType(item, propertyType, result);
|
||||
if (result.DataType.Equals("varchar", StringComparison.CurrentCultureIgnoreCase) && result.Length == 0)
|
||||
{
|
||||
|
@@ -360,6 +360,10 @@ namespace SqlSugar
|
||||
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.ToLower()), dataType, dataSize, nullType, primaryKey, "");
|
||||
|
Reference in New Issue
Block a user