feat: add PUT /api/v2/users/:user-id/suspend endpoint (#1154)

This commit is contained in:
Bruno Quaresma
2022-04-26 09:00:07 -05:00
committed by GitHub
parent f9ce54a51e
commit 441ffd6a0b
14 changed files with 202 additions and 25 deletions
+7 -1
View File
@@ -56,6 +56,11 @@ CREATE TYPE provisioner_type AS ENUM (
'terraform'
);
CREATE TYPE user_status AS ENUM (
'active',
'suspended'
);
CREATE TYPE workspace_transition AS ENUM (
'start',
'stop',
@@ -221,7 +226,8 @@ CREATE TABLE users (
username text DEFAULT ''::text NOT NULL,
hashed_password bytea NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
updated_at timestamp with time zone NOT NULL,
status user_status DEFAULT 'active'::public.user_status NOT NULL
);
CREATE TABLE workspace_agents (