Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit db65b8b

Browse files
fix: minor fix in filtered_builds CTE
1 parent 9c4623a commit db65b8b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

coderd/database/queries.sql.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries/prebuilds.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ WITH filtered_builds AS (
7070
SELECT wlb.template_version_id, wlb.created_at, tvp.id AS preset_id, wlb.job_status, tvp.desired_instances
7171
FROM template_version_presets tvp
7272
INNER JOIN workspace_latest_builds wlb ON wlb.template_version_preset_id = tvp.id
73+
INNER JOIN workspaces w ON wlb.workspace_id = w.id
7374
INNER JOIN template_versions tv ON wlb.template_version_id = tv.id
7475
INNER JOIN templates t ON tv.template_id = t.id AND t.active_version_id = tv.id
7576
WHERE tvp.desired_instances IS NOT NULL -- Consider only presets that have a prebuild configuration.
7677
AND wlb.transition = 'start'::workspace_transition
78+
AND w.owner_id = 'c42fdf75-3097-471c-8c33-fb52454d81c0'
7779
),
7880
time_sorted_builds AS (
7981
-- Group builds by preset, then sort each group by created_at.

0 commit comments

Comments
 (0)