Skip to content

Commit

Permalink
EF Core already does execute the migration in a transaction scope, th…
Browse files Browse the repository at this point in the history
…is was giving a race condition when generating the db (#375)
  • Loading branch information
Jossec101 committed Jun 25, 2024
1 parent 9cdc079 commit 270bae3
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"",
Expand All @@ -26,8 +24,6 @@ protected override void Up(MigrationBuilder migrationBuilder)
ORDER BY ""CreationDatetime""
) AS cor
WHERE c.""Id"" = cor.""ChannelId"";
COMMIT TRANSACTION;
";

migrationBuilder.Sql(query);
Expand Down

0 comments on commit 270bae3

Please sign in to comment.