10000 refactor: use INNER JOIN for consistency · coder/coder@cd70710 · GitHub
[go: up one dir, main page]

Skip to content

Commit cd70710

Browse files
refactor: use INNER JOIN for consistency
1 parent 83a6722 commit cd70710

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

coderd/database/queries.sql.go

Lines changed: 4 additions & 4 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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ WITH filtered_builds AS (
6363
-- Only select builds which are for prebuild creations
6464
SELECT wlb.*, tvp.id AS preset_id, pj.job_status, tvp.desired_instances
6565
FROM template_version_presets tvp
66-
JOIN workspace_latest_builds wlb ON wlb.template_version_preset_id = tvp.id
67-
JOIN provisioner_jobs pj ON wlb.job_id = pj.id
68-
JOIN template_versions tv ON wlb.template_version_id = tv.id
69-
JOIN templates t ON tv.template_id = t.id AND t.active_version_id = tv.id
66+
INNER JOIN workspace_latest_builds wlb ON wlb.template_version_preset_id = tvp.id
67+
INNER JOIN provisioner_jobs pj ON wlb.job_id = pj.id
68+
INNER JOIN template_versions tv ON wlb.template_version_id = tv.id
69+
INNER JOIN templates t ON tv.template_id = t.id AND t.active_version_id = tv.id
7070
WHERE tvp.desired_instances IS NOT NULL -- Consider only presets that have a prebuild configuration.
7171
AND wlb.transition = 'start'::workspace_transition
7272
),

0 commit comments

Comments
 (0)
0