Skip to content

Commit 40140f5

Browse files
refactor: remove * usage from prebuilds views
1 parent e39e22a commit 40140f5

File tree

3 files changed

+10
-42
lines changed

3 files changed

+10
-42
lines changed

coderd/database/dump.sql

+5-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/migrations/000312_prebuilds.up.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- workspace_latest_builds contains latest build for every workspace
22
CREATE VIEW workspace_latest_builds AS
3-
SELECT DISTINCT ON (workspace_id) *
3+
SELECT DISTINCT ON (workspace_id) id, workspace_id, template_version_id, job_id, template_version_preset_id, transition, created_at
44
FROM workspace_builds
55
ORDER BY workspace_id, build_number DESC;
66

@@ -48,6 +48,6 @@ FROM all_prebuilds p
4848
INNER JOIN current_presets cp ON cp.prebuild_id = p.id;
4949

5050
CREATE VIEW workspace_prebuild_builds AS
51-
SELECT *
51+
SELECT id, workspace_id, template_version_id, transition, job_id, template_version_preset_id, build_number
5252
FROM workspace_builds
5353
WHERE initiator_id = 'c42fdf75-3097-471c-8c33-fb52454d81c0'; -- The system user responsible for prebuilds.

coderd/database/models.go

+3-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)