diff --git a/src/dbup-mysql/MySqlConnectionManager.cs b/src/dbup-mysql/MySqlConnectionManager.cs index dde8b6d..4649e2d 100644 --- a/src/dbup-mysql/MySqlConnectionManager.cs +++ b/src/dbup-mysql/MySqlConnectionManager.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using DbUp.Engine.Transactions; -using MySql.Data.MySqlClient; +using MySqlConnector; namespace DbUp.MySql { diff --git a/src/dbup-mysql/MySqlExtensions.cs b/src/dbup-mysql/MySqlExtensions.cs index 478c6e9..cf79f68 100644 --- a/src/dbup-mysql/MySqlExtensions.cs +++ b/src/dbup-mysql/MySqlExtensions.cs @@ -6,7 +6,7 @@ using DbUp.Engine.Output; using DbUp.Engine.Transactions; using DbUp.MySql; -using MySql.Data.MySqlClient; +using MySqlConnector; /// /// Configuration extension methods for MySql. @@ -231,7 +231,7 @@ static void GetMysqlConnectionStringBuilder(string connectionString, IUpgradeLog if (string.IsNullOrEmpty(databaseName) || databaseName.Trim() == string.Empty) throw new InvalidOperationException("The connection string does not specify a database name."); - masterConnectionStringBuilder.Database = "mysql"; + masterConnectionString = masterConnectionStringBuilder.ConnectionString; } } diff --git a/src/dbup-mysql/MySqlScriptExecutor.cs b/src/dbup-mysql/MySqlScriptExecutor.cs index 5e221a6..12673de 100644 --- a/src/dbup-mysql/MySqlScriptExecutor.cs +++ b/src/dbup-mysql/MySqlScriptExecutor.cs @@ -4,7 +4,7 @@ using DbUp.Engine.Output; using DbUp.Engine.Transactions; using DbUp.Support; -using MySql.Data.MySqlClient; +using MySqlConnector; namespace DbUp.MySql { @@ -44,7 +44,7 @@ protected override void ExecuteCommandsWithinExceptionHandler(int index, SqlScri #if MY_SQL_DATA_6_9_5 var code = exception.ErrorCode; #else - var code = exception.Code; + var code = exception.ErrorCode; #endif Log().WriteInformation("MySql exception has occurred in script: '{0}'", script.Name); Log().WriteError("Script block number: {0}; MySql error code: {1}; Number {2}; Message: {3}", index, code, exception.Number, exception.Message); diff --git a/src/dbup-mysql/dbup-mysql.csproj b/src/dbup-mysql/dbup-mysql.csproj index 1e7d602..b92249f 100644 --- a/src/dbup-mysql/dbup-mysql.csproj +++ b/src/dbup-mysql/dbup-mysql.csproj @@ -6,7 +6,7 @@ DbUp Contributors DbUp Copyright © DbUp Contributors 2015 - netstandard1.3;netstandard2.0;net462 + netstandard2.0;net462 dbup-mysql DbUp.MySql dbup-mysql @@ -21,25 +21,25 @@ - + - - + + 2.3.7 + + - - - - - + + 2.3.7 + - +