Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MySqlConnector instead of System.Data.SqlClient #9

Merged
merged 6 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/dbup-mysql/MySqlConnectionManager.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using DbUp.Engine.Transactions;
using MySql.Data.MySqlClient;
using MySqlConnector;


namespace DbUp.MySql
{
Expand Down
2 changes: 1 addition & 1 deletion src/dbup-mysql/MySqlExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using DbUp.Engine.Output;
using DbUp.Engine.Transactions;
using DbUp.MySql;
using MySql.Data.MySqlClient;
using MySqlConnector;

/// <summary>
/// Configuration extension methods for MySql.
Expand Down
4 changes: 2 additions & 2 deletions src/dbup-mysql/MySqlScriptExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using DbUp.Engine.Output;
using DbUp.Engine.Transactions;
using DbUp.Support;
using MySql.Data.MySqlClient;
using MySqlConnector;

namespace DbUp.MySql
{
Expand Down Expand Up @@ -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());
Expand Down
5 changes: 2 additions & 3 deletions src/dbup-mysql/dbup-mysql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@
<EmbedUntrackedSources>true</EmbedUntrackedSources> <!-- Embed source files that are not tracked by the source control manager in the PDB -->
<DebugType>embedded</DebugType> <!-- Recommended: Embed symbols containing Source Link in the main file (exe/dll) -->
</PropertyGroup>

<ItemGroup>
<PackageReference Include="dbup-core" Version="6.0.0-beta.108"/>
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="MySql.Data" Version="8.3.0" />
<PackageReference Include="MySqlConnector" Version="2.3.5"/>
</ItemGroup>

<ItemGroup>
Expand Down
Loading