mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Update xugudb
This commit is contained in:
parent
243f9d4568
commit
9c8ce40842
@ -2,7 +2,7 @@
|
||||
<package >
|
||||
<metadata>
|
||||
<id>SqlSugar.XuguCoreNew</id>
|
||||
<version>5.1.4.171</version>
|
||||
<version>5.1.4.172</version>
|
||||
<authors>sunkaixuan</authors>
|
||||
<owners>果糖大数据</owners>
|
||||
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
|
||||
|
@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
namespace SqlSugar.Xugu
|
||||
@ -72,11 +72,12 @@ namespace SqlSugar.Xugu
|
||||
|
||||
protected override void ExistLogicEnd(List<EntityColumnInfo> dbColumns)
|
||||
{
|
||||
var dbMain = new XuguDbMaintenance() { Context = this.Context };
|
||||
foreach (EntityColumnInfo column in dbColumns)
|
||||
{
|
||||
if (column.DefaultValue != null)
|
||||
{
|
||||
this.Context.DbMaintenance.AddDefaultValue(column.DbTableName, column.DbColumnName, column.DefaultValue.ToSqlValue().TrimStart('\'').TrimEnd('\''));
|
||||
this.Context.DbMaintenance.AddDefaultValue(dbMain.SqlBuilder.GetTranslationTableName(column.DbTableName), dbMain.SqlBuilder.GetTranslationTableName(column.DbColumnName), column.DefaultValue.ToSqlValue().TrimStart('\'').TrimEnd('\''));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -211,7 +211,14 @@ WHERE T.TABLE_NAME='{0}' AND T.DB_ID=CURRENT_DB_ID
|
||||
return tableString;
|
||||
}
|
||||
|
||||
|
||||
public override bool DeleteColumnRemark(string columnName, string tableName)
|
||||
{
|
||||
return base.DeleteColumnRemark(this.SqlBuilder.GetTranslationColumnName(columnName), this.SqlBuilder.GetTranslationColumnName(tableName));
|
||||
}
|
||||
public override bool AddColumnRemark(string columnName, string tableName, string description)
|
||||
{
|
||||
return base.AddColumnRemark(this.SqlBuilder.GetTranslationColumnName(columnName), this.SqlBuilder.GetTranslationColumnName(tableName), description);
|
||||
}
|
||||
public override bool AddDefaultValue(string tableName, string columnName, string defaultValue)
|
||||
{
|
||||
if (defaultValue == "''")
|
||||
|
@ -6,9 +6,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Data.Model
|
||||
{
|
||||
[SqlSugar.SugarTable("T_User222")]
|
||||
public class T_User2
|
||||
{
|
||||
[SqlSugar.SugarColumn(DefaultValue ="0",ColumnDescription ="aaa")]
|
||||
public int num { get; set; }
|
||||
[SqlSugar.SugarColumn(DefaultValue = "0", ColumnDescription = "aaa")]
|
||||
public int number { get; set; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user