Update MySqlBackUp

This commit is contained in:
sunkaixuan
2024-09-29 11:36:59 +08:00
parent a8e0e92a80
commit 321dd3afc8
2 changed files with 11 additions and 3 deletions

View File

@@ -16,6 +16,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 Type Backup_MySqlBackupType { get; set; }
public static Func<long> CustomSnowFlakeFunc;
public static Func<long> CustomSnowFlakeTimeErrorFunc;

View File

@@ -712,11 +712,18 @@ WHERE EVENT_OBJECT_TABLE = '" + tableName + "'");
Assembly assembly = null;
try
{
if (StaticConfig.Backup_MySqlBackupType != null)
{
assembly = StaticConfig.Backup_MySqlBackupType.Assembly;
}
else
{
Assembly currentAssembly = Assembly.GetExecutingAssembly();
string exePath = currentAssembly.Location.Replace("SqlSugar.dll", "MySqlBackupNet.MySqlConnector.dll");
assembly = Assembly.LoadFrom(exePath);
}
}
catch (Exception)
{
Check.ExceptionEasy("Need MySqlBackup.NET.MySqlConnector", "需要安装:MySqlBackup.NET.MySqlConnector");