mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Add template display name (backend) (#4966)
* Rename to nameValidator * Refactor: NameValid * Fix: comment * Define new migration * Include display_name * Update typesGenerated.ts * Update meta * Adjust tests * CLI tests * Fix: audit * Fix: omitempty * site: display_name is optional * unit: TestUsernameValid * entities.ts: add display_name * site: TemplateSettingsPage.test.tsx * Fix: TemplateSettingsForm.tsx * Adjust tests * Add comment to display_name column * Fix: rename * Fix: make * Loosen regexp * Fix: err check * Fix: template name length * Allow for whitespaces * Update migration number
This commit is contained in:
@@ -69,10 +69,11 @@ INSERT INTO
|
||||
created_by,
|
||||
icon,
|
||||
user_acl,
|
||||
group_acl
|
||||
group_acl,
|
||||
display_name
|
||||
)
|
||||
VALUES
|
||||
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING *;
|
||||
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) RETURNING *;
|
||||
|
||||
-- name: UpdateTemplateActiveVersionByID :exec
|
||||
UPDATE
|
||||
@@ -100,7 +101,8 @@ SET
|
||||
description = $3,
|
||||
default_ttl = $4,
|
||||
name = $5,
|
||||
icon = $6
|
||||
icon = $6,
|
||||
display_name = $7
|
||||
WHERE
|
||||
id = $1
|
||||
RETURNING
|
||||
|
||||
Reference in New Issue
Block a user