mirror of https://github.com/coder/coder.git
chore: remove `ALTER TYPE .. ADD VALUE` from migration 65 (#10998)
Follow up of Follow up of https://github.com/coder/coder/pull/10966
This commit is contained in:
parent
cbcf7561e5
commit
49ed66c7ad
|
@ -1,4 +1,28 @@
|
|||
ALTER TYPE audit_action ADD VALUE IF NOT EXISTS 'start';
|
||||
ALTER TYPE audit_action ADD VALUE IF NOT EXISTS 'stop';
|
||||
CREATE TYPE new_audit_action AS ENUM (
|
||||
'create',
|
||||
'write',
|
||||
'delete',
|
||||
'start',
|
||||
'stop'
|
||||
);
|
||||
|
||||
ALTER TYPE resource_type ADD VALUE IF NOT EXISTS 'workspace_build';
|
||||
CREATE TYPE new_resource_type AS ENUM (
|
||||
'organization',
|
||||
'template',
|
||||
'template_version',
|
||||
'user',
|
||||
'workspace',
|
||||
'git_ssh_key',
|
||||
'api_key',
|
||||
'group',
|
||||
'workspace_build'
|
||||
);
|
||||
|
||||
ALTER TABLE audit_logs
|
||||
ALTER COLUMN action TYPE new_audit_action USING (action::text::new_audit_action),
|
||||
ALTER COLUMN resource_type TYPE new_resource_type USING (resource_type::text::new_resource_type);
|
||||
|
||||
DROP TYPE audit_action;
|
||||
ALTER TYPE new_audit_action RENAME TO audit_action;
|
||||
DROP TYPE resource_type;
|
||||
ALTER TYPE new_resource_type RENAME TO resource_type;
|
||||
|
|
Loading…
Reference in New Issue