Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
control-plane: fix prune_unchanged_draft_specs function
The `prune_unchanged_draft_specs` sql function contained a serious bug that would cause it to always prune _all_ drafts that the user has access to. This was due to the function parameter having the same name as a column in the query, which changed the `where draft_specs.draft_id = draft_id` clause to be evaluated as if it were `where draft_specs.draft_id = draft_specs.draft_id`. Changing the parameter name disambiguates this and fixes the bug.
- Loading branch information