From 5870c55aa40b01249f7c29db5ff3fe3035068fa0 Mon Sep 17 00:00:00 2001 From: Vitalii Mikhailov Date: Sat, 24 Feb 2024 23:23:17 +0200 Subject: [PATCH] Fix --- src/BUTR.CrashReportServer/Services/DatabaseMigrator.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/BUTR.CrashReportServer/Services/DatabaseMigrator.cs b/src/BUTR.CrashReportServer/Services/DatabaseMigrator.cs index 6726603..30d53b2 100644 --- a/src/BUTR.CrashReportServer/Services/DatabaseMigrator.cs +++ b/src/BUTR.CrashReportServer/Services/DatabaseMigrator.cs @@ -40,6 +40,7 @@ protected override async Task ExecuteAsync(CancellationToken ct) { var data = await sqlite.Set().OrderBy(x => x.FileId).Skip(i * take).Take(take).ToArrayAsync(ct); await postgres.Set().AddRangeAsync(data, ct); + await postgres.SaveChangesAsync(ct); } var fileDataCount = sqlite.Set().Count(); @@ -47,6 +48,7 @@ protected override async Task ExecuteAsync(CancellationToken ct) { var data = await sqlite.Set().OrderBy(x => x.Id.FileId).Skip(i * take).Take(take).ToArrayAsync(ct); await postgres.Set().AddRangeAsync(data, ct); + await postgres.SaveChangesAsync(ct); } var jsonDataCount = sqlite.Set().Count(); @@ -59,6 +61,7 @@ protected override async Task ExecuteAsync(CancellationToken ct) CrashReport = await new StreamReader(await _compressor.DecompressAsync(x.CrashReportCompressed, ct)).ReadToEndAsync(ct), }).ToArrayAsync(ct); await postgres.Set().AddRangeAsync(data, ct); + await postgres.SaveChangesAsync(ct); } } } \ No newline at end of file