Update mysql table

This commit is contained in:
sunkaixuan
2024-07-12 17:42:47 +08:00
parent dfd786d1a2
commit 7dcaae35b5
3 changed files with 6 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ namespace SqlSugar
public const string CodeFirst_BigString = "varcharmax,longtext,text,clob";
public static string CodeFirst_MySqlCollate{get;set;}
public static string CodeFirst_MySqlTableEngine { get; set; }
public static Func<long> CustomSnowFlakeFunc;
public static Func<long> CustomSnowFlakeTimeErrorFunc;

View File

@@ -488,6 +488,10 @@ WHERE EVENT_OBJECT_TABLE = '" + tableName + "'");
sql = DorisHelper.UpdateDorisSql(this.SqlBuilder, columns, sql);
}
sql = sql.Replace("$PrimaryKey", primaryKeyInfo);
if (!string.IsNullOrEmpty(StaticConfig.CodeFirst_MySqlTableEngine))
{
sql+= " ENGINE = " + StaticConfig.CodeFirst_MySqlTableEngine;
}
this.Context.Ado.ExecuteCommand(sql);
return true;
}

View File

@@ -2,7 +2,7 @@
<package >
<metadata>
<id>SqlSugarCore</id>
<version>5.1.4.163-preview02</version>
<version>5.1.4.163-preview04</version>
<authors>sunkaixuan</authors>
<owners>果糖大数据科技</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>