Skip to content

Commit 06cbfd1

Browse files
committed
save
1 parent 4d7ee0b commit 06cbfd1

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

coderd/database/migrations/000226_provisioner_keys.up.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ CREATE TABLE provisioner_keys (
44
organization_id uuid NOT NULL REFERENCES organizations (id) ON DELETE CASCADE,
55
name varchar(64) NOT NULL,
66
hashed_secret bytea NOT NULL,
7-
UNIQUE (organization_id, name)
87
);
8+
9+
CREATE INDEX provisioner_keys_organization_id_name_idx ON provisioner_keys (organization_id, name);

coderd/database/modelmethods.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,6 @@ func (p ProvisionerKey) RBACObject() rbac.Object {
218218
InOrg(p.OrganizationID)
219219
}
220220

221-
func (p ListProvisionerKeysByOrganizationRow) RBACObject() rbac.Object {
222-
return rbac.ResourceProvisionerKeys.
223-
WithID(p.ID).
224-
InOrg(p.OrganizationID)
225-
}
226-
227221
func (w WorkspaceProxy) RBACObject() rbac.Object {
228222
return rbac.ResourceWorkspaceProxy.
229223
WithID(w.ID)

coderd/database/queries/provisionerkeys.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ INSERT INTO
88
hashed_secret
99
)
1010
VALUES
11-
($1, $2, $3, $4, $5) RETURNING *;
11+
($1, $2, $3, lower($4), $5) RETURNING *;
1212

1313
-- name: GetProvisionerKeyByID :one
1414
SELECT

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