mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
feat: store and display template creator (#2228)
* design commit * add owner_id to templates table * add owner information in apis and ui * update minWidth for statItem * rename owner to created_by * missing refactor to created_by * handle errors in fetching created_by names
This commit is contained in:
6
coderd/database/dump.sql
generated
6
coderd/database/dump.sql
generated
@ -248,7 +248,8 @@ CREATE TABLE templates (
|
||||
active_version_id uuid NOT NULL,
|
||||
description character varying(128) DEFAULT ''::character varying NOT NULL,
|
||||
max_ttl bigint DEFAULT '604800000000000'::bigint NOT NULL,
|
||||
min_autostart_interval bigint DEFAULT '3600000000000'::bigint NOT NULL
|
||||
min_autostart_interval bigint DEFAULT '3600000000000'::bigint NOT NULL,
|
||||
created_by uuid
|
||||
);
|
||||
|
||||
CREATE TABLE users (
|
||||
@ -476,6 +477,9 @@ ALTER TABLE ONLY template_versions
|
||||
ALTER TABLE ONLY template_versions
|
||||
ADD CONSTRAINT template_versions_template_id_fkey FOREIGN KEY (template_id) REFERENCES templates(id) ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE ONLY templates
|
||||
ADD CONSTRAINT templates_created_by_fkey FOREIGN KEY (created_by) REFERENCES users(id) ON DELETE RESTRICT;
|
||||
|
||||
ALTER TABLE ONLY templates
|
||||
ADD CONSTRAINT templates_organization_id_fkey FOREIGN KEY (organization_id) REFERENCES organizations(id) ON DELETE CASCADE;
|
||||
|
||||
|
Reference in New Issue
Block a user