chore: include organization name when fetching templates (#13751)

* chore: include organization name when fetching templates
* chore: rename template_with_user to template_with_names
This commit is contained in:
Steven Masley
2024-07-02 09:08:30 -05:00
committed by GitHub
parent b87c12ba92
commit 128674918b
25 changed files with 177 additions and 84 deletions
+4 -4
View File
@@ -2,7 +2,7 @@
SELECT
*
FROM
template_with_users
template_with_names
WHERE
id = $1
LIMIT
@@ -12,7 +12,7 @@ LIMIT
SELECT
*
FROM
template_with_users AS templates
template_with_names AS templates
WHERE
-- Optionally include deleted templates
templates.deleted = @deleted
@@ -54,7 +54,7 @@ ORDER BY (name, id) ASC
SELECT
*
FROM
template_with_users AS templates
template_with_names AS templates
WHERE
organization_id = @organization_id
AND deleted = @deleted
@@ -63,7 +63,7 @@ LIMIT
1;
-- name: GetTemplates :many
SELECT * FROM template_with_users AS templates
SELECT * FROM template_with_names AS templates
ORDER BY (name, id) ASC
;