Skip to content

Commit

Permalink
Don't execute empty batches (#34882)
Browse files Browse the repository at this point in the history
Fixes #33337
  • Loading branch information
AndriySvyryd authored Oct 13, 2024
1 parent 34d9394 commit 893bf3e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1453,8 +1453,11 @@ protected override void Generate(SqlOperation operation, IModel? model, Migratio

void AppendBatch(string batch)
{
builder.Append(batch);
EndStatement(builder, operation.SuppressTransaction);
if (!string.IsNullOrWhiteSpace(batch))
{
builder.Append(batch);
EndStatement(builder, operation.SuppressTransaction);
}
}
}

Expand Down

0 comments on commit 893bf3e

Please sign in to comment.