diff --git a/Src/Asp.NetCore2/SqlSugar/Infrastructure/StaticConfig.cs b/Src/Asp.NetCore2/SqlSugar/Infrastructure/StaticConfig.cs index 901bf92ab..7be06c8d2 100644 --- a/Src/Asp.NetCore2/SqlSugar/Infrastructure/StaticConfig.cs +++ b/Src/Asp.NetCore2/SqlSugar/Infrastructure/StaticConfig.cs @@ -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 CustomSnowFlakeFunc; public static Func CustomSnowFlakeTimeErrorFunc; diff --git a/Src/Asp.NetCore2/SqlSugar/Realization/MySql/DbMaintenance/MySqlDbMaintenance.cs b/Src/Asp.NetCore2/SqlSugar/Realization/MySql/DbMaintenance/MySqlDbMaintenance.cs index f506883fc..1343aab64 100644 --- a/Src/Asp.NetCore2/SqlSugar/Realization/MySql/DbMaintenance/MySqlDbMaintenance.cs +++ b/Src/Asp.NetCore2/SqlSugar/Realization/MySql/DbMaintenance/MySqlDbMaintenance.cs @@ -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; } diff --git a/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec b/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec index 047fa1041..7c45773ae 100644 --- a/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec +++ b/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec @@ -2,7 +2,7 @@ SqlSugarCore - 5.1.4.163-preview02 + 5.1.4.163-preview04 sunkaixuan 果糖大数据科技 http://www.apache.org/licenses/LICENSE-2.0.html