mirror of
https://github.com/coder/coder.git
synced 2026-06-05 22:18:20 +00:00
17 lines
359 B
SQL
17 lines
359 B
SQL
CREATE TABLE workspaces (
|
|
id uuid NOT NULL UNIQUE,
|
|
created_at timestamptz NOT NULL,
|
|
updated_at timestamptz NOT NULL,
|
|
owner_id text NOT NULL,
|
|
project_id uuid NOT NULL REFERENCES projects (id),
|
|
name varchar(64) NOT NULL,
|
|
UNIQUE(owner_id, name)
|
|
);
|
|
|
|
CREATE TYPE workspace_transition AS ENUM (
|
|
'start',
|
|
'stop',
|
|
'delete'
|
|
);
|
|
|