mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 01:58:13 +08:00
Update mysql codefirst
This commit is contained in:
@@ -417,7 +417,14 @@ WHERE EVENT_OBJECT_TABLE = '" + tableName + "'");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(StaticConfig.CodeFirst_MySqlCollate))
|
||||
{
|
||||
createSql += $" COLLATE {StaticConfig.CodeFirst_MySqlCollate} ";
|
||||
if (createSql.Contains(" COLLATE "))
|
||||
{
|
||||
createSql = $" {Regex.Split(createSql, " COLLATE ").First()} COLLATE {StaticConfig.CodeFirst_MySqlCollate} ";
|
||||
}
|
||||
else
|
||||
{
|
||||
createSql += $" COLLATE {StaticConfig.CodeFirst_MySqlCollate} ";
|
||||
}
|
||||
}
|
||||
newDb.Ado.ExecuteCommand(string.Format(createSql, databaseName, databaseDirectory));
|
||||
}
|
||||
|
Reference in New Issue
Block a user