coderd: autostart: codersdk, http api, database plumbing (#879)
* feat: add columns autostart_schedule, autostop_schedule to database schema * feat: database: add UpdateWorkspaceAutostart and UpdateWorkspaceAutostop methods * feat: add AutostartSchedule/AutostopSchedule to api workspace struct * feat: codersdk: implement update workspace autostart and autostop methods * chore: add unit tests for workspace autostarat and autostop methods
This commit is contained in:
1 parent
c1ff537beb
commit
23f989127d
12 files changed
+535
-41
No files matched your search
@@ -68,3 +68,19 @@ SET
|
||||
deleted = $2
|
||||
WHERE
|
||||
id = $1;
|
||||
|
||||
-- name: UpdateWorkspaceAutostart :exec
|
||||
UPDATE
|
||||
workspaces
|
||||
SET
|
||||
autostart_schedule = $2
|
||||
WHERE
|
||||
id = $1;
|
||||
|
||||
-- name: UpdateWorkspaceAutostop :exec
|
||||
UPDATE
|
||||
workspaces
|
||||
SET
|
||||
autostop_schedule = $2
|
||||
WHERE
|
||||
id = $1;
|
||||
Reference in new issue
Block a user