From 562afcd8b870ae1e4273508b597e0faf9389b43a Mon Sep 17 00:00:00 2001 From: Phil Schneider Date: Wed, 13 Nov 2024 18:19:16 +0100 Subject: [PATCH] fix(seeding): adjust order of deletion (#94) Refs: #93 Reviewed-By: Evelyn Gurschler --- .../Seeder/BatchDeleteSeeder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/database/SsiAuthoritySchemaRegistry.Migrations/Seeder/BatchDeleteSeeder.cs b/src/database/SsiAuthoritySchemaRegistry.Migrations/Seeder/BatchDeleteSeeder.cs index de0b83c..e6bc3ad 100644 --- a/src/database/SsiAuthoritySchemaRegistry.Migrations/Seeder/BatchDeleteSeeder.cs +++ b/src/database/SsiAuthoritySchemaRegistry.Migrations/Seeder/BatchDeleteSeeder.cs @@ -46,9 +46,9 @@ public async Task ExecuteAsync(CancellationToken cancellationToken) return; } - await SeedTable("authorities", x => x.Bpn, cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None); - await SeedTable("credentials", x => x.Id, cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None); await SeedTable("credential_authorities", x => new { x.CredentialId, x.Bpn }, cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None); + await SeedTable("credentials", x => x.Id, cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None); + await SeedTable("authorities", x => x.Bpn, cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None); await context.SaveChangesAsync(cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None); }