feat: add template max_ttl (#6114)

Co-authored-by: Bruno Quaresma <bruno@coder.com>
This commit is contained in:
Dean Sheather
2023-03-07 14:14:58 +00:00
committed by GitHub
co-authored by Bruno Quaresma
parent 248c53d68d
commit 66a6b590a1
71 changed files with 2090 additions and 398 deletions
+17 -7
View File
@@ -67,7 +67,6 @@ INSERT INTO
provisioner,
active_version_id,
description,
default_ttl,
created_by,
icon,
user_acl,
@@ -76,7 +75,7 @@ INSERT INTO
allow_user_cancel_workspace_jobs
)
VALUES
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15) RETURNING *;
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) RETURNING *;
-- name: UpdateTemplateActiveVersionByID :exec
UPDATE
@@ -102,11 +101,22 @@ UPDATE
SET
updated_at = $2,
description = $3,
default_ttl = $4,
name = $5,
icon = $6,
display_name = $7,
allow_user_cancel_workspace_jobs = $8
name = $4,
icon = $5,
display_name = $6,
allow_user_cancel_workspace_jobs = $7
WHERE
id = $1
RETURNING
*;
-- name: UpdateTemplateScheduleByID :one
UPDATE
templates
SET
updated_at = $2,
default_ttl = $3,
max_ttl = $4
WHERE
id = $1
RETURNING