mirror of
https://github.com/coder/coder.git
synced 2025-07-18 14:17:22 +00:00
fix: always show a newly created workspace at the top of the list (#6984)
Fixes #5795.
This commit is contained in:
@ -8014,10 +8014,11 @@ INSERT INTO
|
||||
template_id,
|
||||
name,
|
||||
autostart_schedule,
|
||||
ttl
|
||||
ttl,
|
||||
last_used_at
|
||||
)
|
||||
VALUES
|
||||
($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING id, created_at, updated_at, owner_id, organization_id, template_id, deleted, name, autostart_schedule, ttl, last_used_at
|
||||
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING id, created_at, updated_at, owner_id, organization_id, template_id, deleted, name, autostart_schedule, ttl, last_used_at
|
||||
`
|
||||
|
||||
type InsertWorkspaceParams struct {
|
||||
@ -8030,6 +8031,7 @@ type InsertWorkspaceParams struct {
|
||||
Name string `db:"name" json:"name"`
|
||||
AutostartSchedule sql.NullString `db:"autostart_schedule" json:"autostart_schedule"`
|
||||
Ttl sql.NullInt64 `db:"ttl" json:"ttl"`
|
||||
LastUsedAt time.Time `db:"last_used_at" json:"last_used_at"`
|
||||
}
|
||||
|
||||
func (q *sqlQuerier) InsertWorkspace(ctx context.Context, arg InsertWorkspaceParams) (Workspace, error) {
|
||||
@ -8043,6 +8045,7 @@ func (q *sqlQuerier) InsertWorkspace(ctx context.Context, arg InsertWorkspacePar
|
||||
arg.Name,
|
||||
arg.AutostartSchedule,
|
||||
arg.Ttl,
|
||||
arg.LastUsedAt,
|
||||
)
|
||||
var i Workspace
|
||||
err := row.Scan(
|
||||
|
Reference in New Issue
Block a user