Skip to content

Commit

Permalink
fix: 🐛 Fixed the MySQL issue after .net 6 upgrade #4393
Browse files Browse the repository at this point in the history
* Update pomelo framework for net 6 support

* Aspnetcore v6

* Revert spaservices

* Update all references to old pomelo

* Note problem line

* Disable charsetoption in databaseextensions, version left

* fix: fixed the compiler error

Co-authored-by: Dyson Parkes <dyson@berserkir.net>
  • Loading branch information
tidusjar and Berserkir-Wolf authored Nov 10, 2021
1 parent d0e4492 commit fea7ff0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Ombi.Store/Ombi.Store.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.0-alpha.1" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0" />
<PackageReference Include="Nito.AsyncEx" Version="5.1.0" />
<PackageReference Include="Polly" Version="7.1.0" />
<!--<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="1.1.9" />-->
Expand Down
4 changes: 2 additions & 2 deletions src/Ombi/Extensions/DatabaseExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ public static void ConfigureSqlite(DbContextOptionsBuilder options, PerDatabaseC

public static void ConfigureMySql(DbContextOptionsBuilder options, PerDatabaseConfiguration config)
{
options.UseMySql(config.ConnectionString, b =>
options.UseMySql(config.ConnectionString, ServerVersion.AutoDetect(config.ConnectionString), b =>
{
b.CharSetBehavior(Pomelo.EntityFrameworkCore.MySql.Infrastructure.CharSetBehavior.NeverAppend);
//b.CharSetBehavior(Pomelo.EntityFrameworkCore.MySql.Infrastructure.CharSetBehavior.NeverAppend); // ##ISSUE, link to migrations?
b.EnableRetryOnFailure();
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/Ombi/Ombi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.2.0" />
<PackageReference Include="ncrontab" Version="3.3.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.0-alpha.1" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0" />
<PackageReference Include="Serilog" Version="2.9.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
Expand Down

0 comments on commit fea7ff0

Please # to comment.