fix: Remove duplicate index that blocked same name (#1118)

Multiple workspaces couldn't be created with the same names!
This commit is contained in:
Kyle Carberry
2022-04-25 02:40:14 +00:00
committed by GitHub
parent 23295f7f07
commit 0c042dc249
2 changed files with 2 additions and 5 deletions
@@ -12,8 +12,7 @@ CREATE TABLE workspaces (
);
-- Enforces no active workspaces have the same name.
CREATE UNIQUE INDEX ON workspaces USING btree (owner_id, name) WHERE deleted = FALSE;
CREATE UNIQUE INDEX idx_workspaces_name_lower ON workspaces USING btree (lower(name));
CREATE UNIQUE INDEX ON workspaces USING btree (owner_id, lower(name)) WHERE deleted = FALSE;
CREATE TYPE workspace_transition AS ENUM (
'start',