MySQL Support (#345)

* MySQL EF support added using Pomelo MySQL provider.

* MySQL EF support added using Pomelo MySQL provider.
This commit is contained in:
Aaron Clauson
2018-10-27 16:15:21 +02:00
committed by Nicolas Dorier
parent 9cde4dc7e2
commit ce94c05fd3
8 changed files with 58 additions and 8 deletions

View File

@@ -17,7 +17,8 @@ namespace BTCPayServer.Data
public enum DatabaseType
{
Sqlite,
Postgres
Postgres,
MySQL,
}
public class ApplicationDbContextFactory
{
@@ -95,6 +96,8 @@ namespace BTCPayServer.Data
builder
.UseNpgsql(_ConnectionString)
.ReplaceService<IMigrationsSqlGenerator, CustomNpgsqlMigrationsSqlGenerator>();
else if (_Type == DatabaseType.MySQL)
builder.UseMySql(_ConnectionString);
}
public void ConfigureHangfireBuilder(IGlobalConfiguration builder)