mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: Move httpapi, httpmw, & database into coderd (#568)
* chore: Move httpmw to /coderd directory httpmw is specific to coderd and should be scoped under coderd * chore: Move httpapi to /coderd directory httpapi is specific to coderd and should be scoped under coderd * chore: Move database to /coderd directory database is specific to coderd and should be scoped under coderd * chore: Update codecov & gitattributes for generated files * chore: Update Makefile
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
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),
|
||||
deleted boolean NOT NULL DEFAULT FALSE,
|
||||
name varchar(64) NOT NULL
|
||||
);
|
||||
|
||||
-- Enforces no active workspaces have the same name.
|
||||
CREATE UNIQUE INDEX ON workspaces (owner_id, name) WHERE deleted = FALSE;
|
||||
|
||||
CREATE TYPE workspace_transition AS ENUM (
|
||||
'start',
|
||||
'stop',
|
||||
'delete'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user