Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit94e423b

Browse files
committed
wip
Signed-off-by: Callum Styan <callumstyan@gmail.com>
1 parent3dcd2ac commit94e423b

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
DROPVIEW IF EXISTS template_with_names;
2+
CREATEVIEWtemplate_with_namesAS
3+
SELECTtemplates.id,
4+
templates.created_at,
5+
templates.updated_at,
6+
templates.organization_id,
7+
templates.deleted,
8+
templates.name,
9+
templates.provisioner,
10+
templates.active_version_id,
11+
templates.description,
12+
templates.default_ttl,
13+
templates.created_by,
14+
templates.icon,
15+
templates.user_acl,
16+
templates.group_acl,
17+
templates.display_name,
18+
templates.allow_user_cancel_workspace_jobs,
19+
templates.allow_user_autostart,
20+
templates.allow_user_autostop,
21+
templates.failure_ttl,
22+
templates.time_til_dormant,
23+
templates.time_til_dormant_autodelete,
24+
templates.autostop_requirement_days_of_week,
25+
templates.autostop_requirement_weeks,
26+
templates.autostart_block_days_of_week,
27+
templates.require_active_version,
28+
templates.deprecated,
29+
templates.activity_bump,
30+
templates.max_port_sharing_level,
31+
templates.use_classic_parameter_flow,
32+
COALESCE(visible_users.avatar_url,''::text)AS created_by_avatar_url,
33+
COALESCE(visible_users.username,''::text)AS created_by_username,
34+
COALESCE(visible_users.name,''::text)AS created_by_name,
35+
COALESCE(organizations.name,''::text)AS organization_name,
36+
COALESCE(organizations.display_name,''::text)AS organization_display_name,
37+
COALESCE(organizations.icon,''::text)AS organization_icon
38+
FROM ((templates
39+
LEFT JOIN visible_usersON ((templates.created_by=visible_users.id)))
40+
LEFT JOIN organizationsON ((templates.organization_id=organizations.id)));
41+
42+
COMMENT ON VIEW template_with_names IS'Joins in the display name information such as username, avatar, and organization name.';
43+
44+
ALTERTABLE templates DROP COLUMN cors_behavior;
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
CREATETYPEapp_cors_behaviorAS ENUM (
2+
'simple',
3+
'passthru'
4+
);
5+
6+
ALTERTABLE templates
7+
ADD COLUMN cors_behavior cors_behaviorNOT NULL DEFAULT'simple'::cors_behavior;
8+
9+
-- Update the template_with_users view by recreating it.
10+
DROPVIEW IF EXISTS template_with_names;
11+
CREATEVIEWtemplate_with_namesAS
12+
SELECTtemplates.id,
13+
templates.created_at,
14+
templates.updated_at,
15+
templates.organization_id,
16+
templates.deleted,
17+
templates.name,
18+
templates.provisioner,
19+
templates.active_version_id,
20+
templates.description,
21+
templates.default_ttl,
22+
templates.created_by,
23+
templates.icon,
24+
templates.user_acl,
25+
templates.group_acl,
26+
templates.display_name,
27+
templates.allow_user_cancel_workspace_jobs,
28+
templates.allow_user_autostart,
29+
templates.allow_user_autostop,
30+
templates.failure_ttl,
31+
templates.time_til_dormant,
32+
templates.time_til_dormant_autodelete,
33+
templates.autostop_requirement_days_of_week,
34+
templates.autostop_requirement_weeks,
35+
templates.autostart_block_days_of_week,
36+
templates.require_active_version,
37+
templates.deprecated,
38+
templates.activity_bump,
39+
templates.max_port_sharing_level,
40+
templates.use_classic_parameter_flow,
41+
templates.cors_behavior,-- <--- adding this column
42+
COALESCE(visible_users.avatar_url,''::text)AS created_by_avatar_url,
43+
COALESCE(visible_users.username,''::text)AS created_by_username,
44+
COALESCE(visible_users.name,''::text)AS created_by_name,
45+
COALESCE(organizations.name,''::text)AS organization_name,
46+
COALESCE(organizations.display_name,''::text)AS organization_display_name,
47+
COALESCE(organizations.icon,''::text)AS organization_icon
48+
FROM ((templates
49+
LEFT JOIN visible_usersON ((templates.created_by=visible_users.id)))
50+
LEFT JOIN organizationsON ((templates.organization_id=organizations.id)));
51+
52+
COMMENT ON VIEW template_with_names IS'Joins in the display name information such as username, avatar, and organization name.';

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp