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