diff --git a/src/portalbackend/PortalBackend.Migrations/Seeder/BatchUpdateSeeder.cs b/src/portalbackend/PortalBackend.Migrations/Seeder/BatchUpdateSeeder.cs index 6b3b9c7241..5c9d6d16db 100644 --- a/src/portalbackend/PortalBackend.Migrations/Seeder/BatchUpdateSeeder.cs +++ b/src/portalbackend/PortalBackend.Migrations/Seeder/BatchUpdateSeeder.cs @@ -158,6 +158,16 @@ await SeedTable("company_applications", dbEntry.ChecklistProcessId = entry.ChecklistProcessId; }, cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None); + await SeedTable("agreements", + x => x.Id, + x => x.dataEntity.Name != x.dbEntity.Name || x.dataEntity.AgreementStatusId != x.dbEntity.AgreementStatusId, + (dbEntry, entry) => + { + dbEntry.Name = entry.Name; + dbEntry.AgreementStatusId = entry.AgreementStatusId; + dbEntry.DateLastChanged = DateTimeOffset.UtcNow; + }, cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None); + await _context.SaveChangesAsync(cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None); _logger.LogInformation("Finished BaseEntityBatch Seeder"); }