- Notifications
You must be signed in to change notification settings - Fork927
chore: return organization's display name and icon in templates#13858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
ef49cd7
ed2b48f
f7d3e17
f3c2361
378a042
eb93911
8cae3e3
b3bd5a2
31bd3fd
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
DROP VIEW template_with_names; | ||
CREATE VIEW | ||
template_with_names | ||
AS | ||
SELECT | ||
templates.*, | ||
coalesce(visible_users.avatar_url, '') AS created_by_avatar_url, | ||
coalesce(visible_users.username, '') AS created_by_username, | ||
coalesce(organizations.name, '') AS organization_name | ||
FROM | ||
templates | ||
LEFT JOIN | ||
visible_users | ||
ON | ||
templates.created_by = visible_users.id | ||
LEFT JOIN | ||
organizations | ||
ON templates.organization_id = organizations.id | ||
; | ||
COMMENT ON VIEW template_with_names IS 'Joins in the display name information such as username, avatar, and organization name.'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
-- Update the template_with_names view by recreating it. | ||
DROP VIEW template_with_names; | ||
CREATE VIEW | ||
template_with_names | ||
AS | ||
SELECT | ||
templates.*, | ||
coalesce(visible_users.avatar_url, '') AS created_by_avatar_url, | ||
coalesce(visible_users.username, '') AS created_by_username, | ||
coalesce(organizations.name, '') AS organization_name, | ||
coalesce(organizations.display_name, '') AS organization_display_name, | ||
coalesce(organizations.icon, '') AS organization_icon | ||
FROM | ||
templates | ||
LEFT JOIN | ||
visible_users | ||
ON | ||
templates.created_by = visible_users.id | ||
LEFT JOIN | ||
organizations | ||
ON templates.organization_id = organizations.id | ||
; | ||
COMMENT ON VIEW template_with_names IS 'Joins in the display name information such as username, avatar, and organization name.'; |
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.