diff --git a/src/dbup-mysql/MySqlConnectionManager.cs b/src/dbup-mysql/MySqlConnectionManager.cs index dde8b6d..5f25c63 100644 --- a/src/dbup-mysql/MySqlConnectionManager.cs +++ b/src/dbup-mysql/MySqlConnectionManager.cs @@ -1,6 +1,7 @@ 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 7f32379..bd4f887 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. diff --git a/src/dbup-mysql/MySqlScriptExecutor.cs b/src/dbup-mysql/MySqlScriptExecutor.cs index 70324de..8fff2f5 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 { @@ -41,7 +41,7 @@ protected override void ExecuteCommandsWithinExceptionHandler(int index, SqlScri } catch (MySqlException exception) { - var code = exception.Code; + var code = exception.ErrorCode; Log().LogInformation("MySql exception has occurred in script: '{0}'", script.Name); Log().LogError("Script block number: {0}; MySql error code: {1}; Number {2}; Message: {3}", index, code, exception.Number, exception.Message); Log().LogError(exception.ToString()); diff --git a/src/dbup-mysql/dbup-mysql.csproj b/src/dbup-mysql/dbup-mysql.csproj index ce3df24..7815340 100644 --- a/src/dbup-mysql/dbup-mysql.csproj +++ b/src/dbup-mysql/dbup-mysql.csproj @@ -21,11 +21,10 @@ true embedded - + - - +