Skip to content

Commit 44ec1ab

Browse files
committed
feat: persist app groups in the database
1 parent 513a468 commit 44ec1ab

File tree

27 files changed

+398
-322
lines changed

27 files changed

+398
-322
lines changed

coderd/apidoc/docs.go

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

coderd/apidoc/swagger.json

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

coderd/database/db2sdk/db2sdk.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ func Apps(dbApps []database.WorkspaceApp, statuses []database.WorkspaceAppStatus
525525
Threshold: dbApp.HealthcheckThreshold,
526526
},
527527
Health: codersdk.WorkspaceAppHealth(dbApp.Health),
528+
Group: dbApp.DisplayGroup.String,
528529
Hidden: dbApp.Hidden,
529530
OpenIn: codersdk.WorkspaceAppOpenIn(dbApp.OpenIn),
530531
Statuses: WorkspaceAppStatuses(statuses),

coderd/database/dbgen/dbgen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,7 @@ func WorkspaceApp(t testing.TB, db database.Store, orig database.WorkspaceApp) d
748748
HealthcheckThreshold: takeFirst(orig.HealthcheckThreshold, 60),
749749
Health: takeFirst(orig.Health, database.WorkspaceAppHealthHealthy),
750750
DisplayOrder: takeFirst(orig.DisplayOrder, 1),
751+
DisplayGroup: orig.DisplayGroup,
751752
Hidden: orig.Hidden,
752753
OpenIn: takeFirst(orig.OpenIn, database.WorkspaceAppOpenInSlimWindow),
753754
})

coderd/database/dump.sql

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alter table workspace_apps drop column display_group;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alter table workspace_apps add column display_group text;

coderd/database/models.go

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

coderd/database/queries.sql.go

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

coderd/database/queries/workspaceapps.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ INSERT INTO
3030
health,
3131
display_order,
3232
hidden,
33-
open_in
33+
open_in,
34+
display_group
3435
)
3536
VALUES
36-
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18) RETURNING *;
37+
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19) RETURNING *;
3738

3839
-- name: UpdateWorkspaceAppHealthByID :exec
3940
UPDATE

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy