From 91d20ad049a5b410952690a767e3bcb7cf8810eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20A=2EP?= <53834183+Jossec101@users.noreply.github.com> Date: Tue, 25 Jun 2024 12:09:56 +0200 Subject: [PATCH] EF Core already does execute the migration in a transaction scope, this was giving a race condition when generating the db --- ...0230309121807_UpdateSourceDestChannelNodeIdFromRequests.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Migrations/20230309121807_UpdateSourceDestChannelNodeIdFromRequests.cs b/src/Migrations/20230309121807_UpdateSourceDestChannelNodeIdFromRequests.cs index 067c4115..3dedb3bd 100644 --- a/src/Migrations/20230309121807_UpdateSourceDestChannelNodeIdFromRequests.cs +++ b/src/Migrations/20230309121807_UpdateSourceDestChannelNodeIdFromRequests.cs @@ -9,8 +9,6 @@ public partial class UpdateSourceDestChannelNodeIdFromRequests : Migration protected override void Up(MigrationBuilder migrationBuilder) { string query = @" -BEGIN TRANSACTION; - UPDATE public.""Channels"" AS c SET ""SourceNodeId"" = cor.""SourceNodeId"", @@ -26,8 +24,6 @@ FROM public.""ChannelOperationRequests"" ORDER BY ""CreationDatetime"" ) AS cor WHERE c.""Id"" = cor.""ChannelId""; - -COMMIT TRANSACTION; "; migrationBuilder.Sql(query);