Skip to content

Commit

Permalink
fix(taps): Hard and soft deletes for handling ACTIVATE_VERSION mess…
Browse files Browse the repository at this point in the history
…ages now use the same `WHERE` clause (#2242)

fix: using same logic for both hard and soft deletes

Soft delete is deleting only versions smaller than the latest version
Hard delete is deleting smaller and equal.
Making both strategies delete only smaller versions.
  • Loading branch information
vitoravancini authored Feb 14, 2024
1 parent 2de41df commit 5734e69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion singer_sdk/connectors/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,6 @@ def delete_old_versions(
conn.execute(
sa.text(
f"DELETE FROM {full_table_name} " # noqa: S608
f"WHERE {version_column_name} <= {current_version}",
f"WHERE {version_column_name} < {current_version}",
),
)

0 comments on commit 5734e69

Please sign in to comment.