mirror of https://github.com/coder/coder.git
chore: remove `ALTER TYPE .. ADD VALUE` from migration 46 (#10997)
Follow up of https://github.com/coder/coder/pull/10966
This commit is contained in:
parent
427572199e
commit
cbcf7561e5
|
@ -1,2 +1,15 @@
|
|||
ALTER TYPE resource_type ADD VALUE IF NOT EXISTS 'git_ssh_key';
|
||||
ALTER TYPE resource_type ADD VALUE IF NOT EXISTS 'api_key';
|
||||
CREATE TYPE new_resource_type AS ENUM (
|
||||
'organization',
|
||||
'template',
|
||||
'template_version',
|
||||
'user',
|
||||
'workspace',
|
||||
'git_ssh_key',
|
||||
'api_key'
|
||||
);
|
||||
|
||||
ALTER TABLE audit_logs
|
||||
ALTER COLUMN resource_type TYPE new_resource_type USING(resource_type::text::new_resource_type);
|
||||
|
||||
DROP TYPE resource_type;
|
||||
ALTER TYPE new_resource_type RENAME TO resource_type;
|
||||
|
|
Loading…
Reference in New Issue