mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-19 06:54:19 +01:00
MySQL Support (#345)
* MySQL EF support added using Pomelo MySQL provider. * MySQL EF support added using Pomelo MySQL provider.
This commit is contained in:
committed by
Nicolas Dorier
parent
9cde4dc7e2
commit
ce94c05fd3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user