mirror of
https://github.com/coder/coder.git
synced 2025-07-18 14:17:22 +00:00
feat: add keys to organization provision daemons (#14627)
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
ALTER TABLE provisioner_daemons DROP COLUMN key_id;
|
||||
|
||||
DELETE FROM provisioner_keys WHERE name = 'built-in';
|
||||
DELETE FROM provisioner_keys WHERE name = 'psk';
|
||||
DELETE FROM provisioner_keys WHERE name = 'user-auth';
|
@ -0,0 +1,6 @@
|
||||
INSERT INTO provisioner_keys (id, created_at, organization_id, name, hashed_secret, tags) VALUES ('00000000-0000-0000-0000-000000000001'::uuid, NOW(), (SELECT id FROM organizations WHERE is_default = true), 'built-in', ''::bytea, '{}');
|
||||
INSERT INTO provisioner_keys (id, created_at, organization_id, name, hashed_secret, tags) VALUES ('00000000-0000-0000-0000-000000000002'::uuid, NOW(), (SELECT id FROM organizations WHERE is_default = true), 'user-auth', ''::bytea, '{}');
|
||||
INSERT INTO provisioner_keys (id, created_at, organization_id, name, hashed_secret, tags) VALUES ('00000000-0000-0000-0000-000000000003'::uuid, NOW(), (SELECT id FROM organizations WHERE is_default = true), 'psk', ''::bytea, '{}');
|
||||
|
||||
ALTER TABLE provisioner_daemons ADD COLUMN key_id UUID REFERENCES provisioner_keys(id) ON DELETE CASCADE DEFAULT '00000000-0000-0000-0000-000000000001'::uuid NOT NULL;
|
||||
ALTER TABLE provisioner_daemons ALTER COLUMN key_id DROP DEFAULT;
|
Reference in New Issue
Block a user