mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: Rename Projects to Templates (#880)
Customer feedback indicated projects was a confusing name.
After querying the team internally, it seemed unanimous
that it is indeed a confusing name.
Here's for a lil less confusion @ashmeer7 🥂
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
-- name: GetTemplateByID :one
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
templates
|
||||
WHERE
|
||||
id = $1
|
||||
LIMIT
|
||||
1;
|
||||
|
||||
-- name: GetTemplatesByIDs :many
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
templates
|
||||
WHERE
|
||||
id = ANY(@ids :: uuid [ ]);
|
||||
|
||||
-- name: GetTemplateByOrganizationAndName :one
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
templates
|
||||
WHERE
|
||||
organization_id = @organization_id
|
||||
AND deleted = @deleted
|
||||
AND LOWER("name") = LOWER(@name)
|
||||
LIMIT
|
||||
1;
|
||||
|
||||
-- name: GetTemplatesByOrganization :many
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
templates
|
||||
WHERE
|
||||
organization_id = $1
|
||||
AND deleted = $2;
|
||||
|
||||
-- name: InsertTemplate :one
|
||||
INSERT INTO
|
||||
templates (
|
||||
id,
|
||||
created_at,
|
||||
updated_at,
|
||||
organization_id,
|
||||
"name",
|
||||
provisioner,
|
||||
active_version_id
|
||||
)
|
||||
VALUES
|
||||
($1, $2, $3, $4, $5, $6, $7) RETURNING *;
|
||||
|
||||
-- name: UpdateTemplateActiveVersionByID :exec
|
||||
UPDATE
|
||||
templates
|
||||
SET
|
||||
active_version_id = $2
|
||||
WHERE
|
||||
id = $1;
|
||||
|
||||
-- name: UpdateTemplateDeletedByID :exec
|
||||
UPDATE
|
||||
templates
|
||||
SET
|
||||
deleted = $2
|
||||
WHERE
|
||||
id = $1;
|
||||
Reference in New Issue
Block a user