mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: Remove resource addresses (#982)
These were added under the impression that there was significant user-experience impact if multiple resources share the same name. This hasn't proven to be true yet, so figured we'd take this out until it becomes necessary.
This commit is contained in:
@@ -2518,7 +2518,7 @@ func (q *sqlQuerier) UpdateWorkspaceBuildByID(ctx context.Context, arg UpdateWor
|
||||
|
||||
const getWorkspaceResourceByID = `-- name: GetWorkspaceResourceByID :one
|
||||
SELECT
|
||||
id, created_at, job_id, transition, address, type, name
|
||||
id, created_at, job_id, transition, type, name
|
||||
FROM
|
||||
workspace_resources
|
||||
WHERE
|
||||
@@ -2533,7 +2533,6 @@ func (q *sqlQuerier) GetWorkspaceResourceByID(ctx context.Context, id uuid.UUID)
|
||||
&i.CreatedAt,
|
||||
&i.JobID,
|
||||
&i.Transition,
|
||||
&i.Address,
|
||||
&i.Type,
|
||||
&i.Name,
|
||||
)
|
||||
@@ -2542,7 +2541,7 @@ func (q *sqlQuerier) GetWorkspaceResourceByID(ctx context.Context, id uuid.UUID)
|
||||
|
||||
const getWorkspaceResourcesByJobID = `-- name: GetWorkspaceResourcesByJobID :many
|
||||
SELECT
|
||||
id, created_at, job_id, transition, address, type, name
|
||||
id, created_at, job_id, transition, type, name
|
||||
FROM
|
||||
workspace_resources
|
||||
WHERE
|
||||
@@ -2563,7 +2562,6 @@ func (q *sqlQuerier) GetWorkspaceResourcesByJobID(ctx context.Context, jobID uui
|
||||
&i.CreatedAt,
|
||||
&i.JobID,
|
||||
&i.Transition,
|
||||
&i.Address,
|
||||
&i.Type,
|
||||
&i.Name,
|
||||
); err != nil {
|
||||
@@ -2582,17 +2580,9 @@ func (q *sqlQuerier) GetWorkspaceResourcesByJobID(ctx context.Context, jobID uui
|
||||
|
||||
const insertWorkspaceResource = `-- name: InsertWorkspaceResource :one
|
||||
INSERT INTO
|
||||
workspace_resources (
|
||||
id,
|
||||
created_at,
|
||||
job_id,
|
||||
transition,
|
||||
address,
|
||||
type,
|
||||
name
|
||||
)
|
||||
workspace_resources (id, created_at, job_id, transition, type, name)
|
||||
VALUES
|
||||
($1, $2, $3, $4, $5, $6, $7) RETURNING id, created_at, job_id, transition, address, type, name
|
||||
($1, $2, $3, $4, $5, $6) RETURNING id, created_at, job_id, transition, type, name
|
||||
`
|
||||
|
||||
type InsertWorkspaceResourceParams struct {
|
||||
@@ -2600,7 +2590,6 @@ type InsertWorkspaceResourceParams struct {
|
||||
CreatedAt time.Time `db:"created_at" json:"created_at"`
|
||||
JobID uuid.UUID `db:"job_id" json:"job_id"`
|
||||
Transition WorkspaceTransition `db:"transition" json:"transition"`
|
||||
Address string `db:"address" json:"address"`
|
||||
Type string `db:"type" json:"type"`
|
||||
Name string `db:"name" json:"name"`
|
||||
}
|
||||
@@ -2611,7 +2600,6 @@ func (q *sqlQuerier) InsertWorkspaceResource(ctx context.Context, arg InsertWork
|
||||
arg.CreatedAt,
|
||||
arg.JobID,
|
||||
arg.Transition,
|
||||
arg.Address,
|
||||
arg.Type,
|
||||
arg.Name,
|
||||
)
|
||||
@@ -2621,7 +2609,6 @@ func (q *sqlQuerier) InsertWorkspaceResource(ctx context.Context, arg InsertWork
|
||||
&i.CreatedAt,
|
||||
&i.JobID,
|
||||
&i.Transition,
|
||||
&i.Address,
|
||||
&i.Type,
|
||||
&i.Name,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user