Skip to content

Commit 92b35ff

Browse files
feat: add parent_id column to workspace_agents table
Adds a new nullable column `parent_id` to `workspace_agents` table. This lays the groundwork for having child agents.
1 parent 7af188b commit 92b35ff

File tree

20 files changed

+276
-34
lines changed

20 files changed

+276
-34
lines changed

coderd/apidoc/docs.go

Lines changed: 20 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: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/dump.sql

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

coderd/database/foreign_key_constraint.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE workspace_agents
2+
DROP COLUMN IF EXISTS parent_id;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE workspace_agents
2+
ADD COLUMN parent_id UUID REFERENCES workspace_agents (id) ON DELETE CASCADE;

coderd/database/models.go

Lines changed: 2 additions & 1 deletion
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 & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codersdk/workspaceagents.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ const (
139139

140140
type WorkspaceAgent struct {
141141
ID uuid.UUID `json:"id" format:"uuid"`
142+
ParentID uuid.NullUUID `json:"parent_id" format:"uuid"`
142143
CreatedAt time.Time `json:"created_at" format:"date-time"`
143144
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
144145
FirstConnectedAt *time.Time `json:"first_connected_at,omitempty" format:"date-time"`

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