Skip to content

Commit

Permalink
chore: add config-id to retention partition query
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored Dec 6, 2023
1 parent 634b608 commit 9f30224
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scrapers/retention.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func ProcessChangeRetention(ctx context.Context, scraperID uuid.UUID, spec v1.Ch

query := fmt.Sprintf(`
WITH latest_config_changes AS (
SELECT id, change_type, created_at, ROW_NUMBER() OVER(ORDER BY created_at DESC) AS seq
SELECT id, change_type, created_at, ROW_NUMBER() OVER(PARTITION BY config_id ORDER BY created_at DESC) AS seq
FROM config_changes
WHERE
change_type = @changeType AND
Expand Down

0 comments on commit 9f30224

Please sign in to comment.