Skip to content

Commit 0133050

Browse files
authored
Revert "feat: add template version creator (#2991)"
This reverts commit aea3b3b.
1 parent eebf0dd commit 0133050

File tree

14 files changed

+16
-106
lines changed

14 files changed

+16
-106
lines changed

coderd/audit/diff_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,12 @@ func TestDiff(t *testing.T) {
114114
UpdatedAt: time.Now(),
115115
OrganizationID: uuid.UUID{3},
116116
Name: "rust",
117-
CreatedBy: uuid.UUID{4},
118117
},
119118
exp: audit.Map{
120119
"id": uuid.UUID{1}.String(),
121120
"template_id": uuid.UUID{2}.String(),
122121
"organization_id": uuid.UUID{3}.String(),
123122
"name": "rust",
124-
"created_by": uuid.UUID{4}.String(),
125123
},
126124
},
127125
{
@@ -134,13 +132,11 @@ func TestDiff(t *testing.T) {
134132
UpdatedAt: time.Now(),
135133
OrganizationID: uuid.UUID{3},
136134
Name: "rust",
137-
CreatedBy: uuid.UUID{4},
138135
},
139136
exp: audit.Map{
140137
"id": uuid.UUID{1}.String(),
141138
"organization_id": uuid.UUID{3}.String(),
142139
"name": "rust",
143-
"created_by": uuid.UUID{4}.String(),
144140
},
145141
},
146142
})

coderd/audit/table.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ var AuditableResources = auditMap(map[any]map[string]Action{
8383
"name": ActionTrack,
8484
"readme": ActionTrack,
8585
"job_id": ActionIgnore, // Not helpful in a diff because jobs aren't tracked in audit logs.
86-
"created_by": ActionTrack,
8786
},
8887
&database.User{}: {
8988
"id": ActionTrack,

coderd/database/databasefake/databasefake.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,6 @@ func (q *fakeQuerier) InsertTemplateVersion(_ context.Context, arg database.Inse
15111511
Name: arg.Name,
15121512
Readme: arg.Readme,
15131513
JobID: arg.JobID,
1514-
CreatedBy: arg.CreatedBy,
15151514
}
15161515
q.templateVersions = append(q.templateVersions, version)
15171516
return version, nil

coderd/database/dump.sql

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/migrations/000030_template_version_created_by.down.sql

Lines changed: 0 additions & 1 deletion
This file was deleted.

coderd/database/migrations/000030_template_version_created_by.up.sql

Lines changed: 0 additions & 14 deletions
This file was deleted.

coderd/database/models.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries.sql.go

Lines changed: 7 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries/templateversions.sql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,10 @@ INSERT INTO
7070
updated_at,
7171
"name",
7272
readme,
73-
job_id,
74-
created_by
73+
job_id
7574
)
7675
VALUES
77-
($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING *;
76+
($1, $2, $3, $4, $5, $6, $7, $8) RETURNING *;
7877

7978
-- name: UpdateTemplateVersionByID :exec
8079
UPDATE

coderd/templates.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ func (api *API) postTemplateByOrganization(rw http.ResponseWriter, r *http.Reque
209209
UUID: dbTemplate.ID,
210210
Valid: true,
211211
},
212-
UpdatedAt: database.Now(),
213212
})
214213
if err != nil {
215214
return xerrors.Errorf("insert template version: %s", err)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy