Skip to content

Commit

Permalink
Don't run migration for empty updates (#3210)
Browse files Browse the repository at this point in the history
  • Loading branch information
schustmi authored Nov 25, 2024
1 parent f45f739 commit 39f9ca9
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ def _migrate_artifact_type() -> None:
{"id_": artifact_version_id, "type": "ServiceArtifact"}
)

connection.execute(
sa.update(artifact_version_table).where(
artifact_version_table.c.id == sa.bindparam("id_")
),
updates,
)
if updates:
connection.execute(
sa.update(artifact_version_table).where(
artifact_version_table.c.id == sa.bindparam("id_")
),
updates,
)


def upgrade() -> None:
Expand Down

0 comments on commit 39f9ca9

Please sign in to comment.