mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
refactor: Show template versions as timeline (#4800)
This commit is contained in:
2
coderd/database/dump.sql
generated
2
coderd/database/dump.sql
generated
@ -327,7 +327,7 @@ CREATE TABLE template_versions (
|
||||
name character varying(64) NOT NULL,
|
||||
readme character varying(1048576) NOT NULL,
|
||||
job_id uuid NOT NULL,
|
||||
created_by uuid
|
||||
created_by uuid NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE templates (
|
||||
|
@ -0,0 +1 @@
|
||||
ALTER TABLE template_versions ALTER COLUMN created_by DROP NOT NULL;
|
@ -0,0 +1,4 @@
|
||||
BEGIN;
|
||||
ALTER TABLE template_versions ALTER COLUMN created_by SET NOT NULL;
|
||||
UPDATE template_versions SET created_by = '00000000-0000-0000-0000-000000000000'::uuid WHERE created_by IS NULL;
|
||||
COMMIT;
|
@ -600,7 +600,7 @@ type TemplateVersion struct {
|
||||
Name string `db:"name" json:"name"`
|
||||
Readme string `db:"readme" json:"readme"`
|
||||
JobID uuid.UUID `db:"job_id" json:"job_id"`
|
||||
CreatedBy uuid.NullUUID `db:"created_by" json:"created_by"`
|
||||
CreatedBy uuid.UUID `db:"created_by" json:"created_by"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
|
@ -3634,7 +3634,7 @@ type InsertTemplateVersionParams struct {
|
||||
Name string `db:"name" json:"name"`
|
||||
Readme string `db:"readme" json:"readme"`
|
||||
JobID uuid.UUID `db:"job_id" json:"job_id"`
|
||||
CreatedBy uuid.NullUUID `db:"created_by" json:"created_by"`
|
||||
CreatedBy uuid.UUID `db:"created_by" json:"created_by"`
|
||||
}
|
||||
|
||||
func (q *sqlQuerier) InsertTemplateVersion(ctx context.Context, arg InsertTemplateVersionParams) (TemplateVersion, error) {
|
||||
|
Reference in New Issue
Block a user