mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add API support for workspace automatic updates (#10099)
* Added automatic_updates to workspaces table Signed-off-by: Spike Curtis <spike@coder.com> * Queries and API updates Signed-off-by: Spike Curtis <spike@coder.com> * Golden files Signed-off-by: Spike Curtis <spike@coder.com> * Enable automatic updates on autostart Signed-off-by: Spike Curtis <spike@coder.com> * db migration number Signed-off-by: Spike Curtis <spike@coder.com> * fix imports and ts mock Signed-off-by: Spike Curtis <spike@coder.com> * code review updates Signed-off-by: Spike Curtis <spike@coder.com> --------- Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
@@ -299,10 +299,11 @@ INSERT INTO
|
||||
name,
|
||||
autostart_schedule,
|
||||
ttl,
|
||||
last_used_at
|
||||
last_used_at,
|
||||
automatic_updates
|
||||
)
|
||||
VALUES
|
||||
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING *;
|
||||
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING *;
|
||||
|
||||
-- name: UpdateWorkspaceDeletedByID :exec
|
||||
UPDATE
|
||||
@@ -512,3 +513,11 @@ SET
|
||||
last_used_at = @last_used_at::timestamptz
|
||||
WHERE
|
||||
template_id = @template_id;
|
||||
|
||||
-- name: UpdateWorkspaceAutomaticUpdates :exec
|
||||
UPDATE
|
||||
workspaces
|
||||
SET
|
||||
automatic_updates = $2
|
||||
WHERE
|
||||
id = $1;
|
||||
|
||||
Reference in New Issue
Block a user