migrate to postgresql

This commit is contained in:
Stanley Dimant
2022-08-01 00:48:21 +02:00
parent 0a4825fe78
commit 7a40eba295
34 changed files with 731 additions and 2793 deletions

View File

@@ -16,6 +16,7 @@ using Prometheus;
using WebSocketOptions = Microsoft.AspNetCore.Builder.WebSocketOptions;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Logging;
using Microsoft.EntityFrameworkCore.Migrations;
namespace MareSynchronosServer
{
@@ -47,10 +48,11 @@ namespace MareSynchronosServer
services.AddDbContextPool<MareDbContext>(options =>
{
options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection"), builder =>
options.UseNpgsql(Configuration.GetConnectionString("DefaultConnection"), builder =>
{
});
}, 32000);
builder.MigrationsHistoryTable("_efmigrationshistory", "public");
}).UseSnakeCaseNamingConvention();
});
services.AddHostedService<FileCleanupService>();
services.AddHostedService(provider => provider.GetService<SystemInfoService>());