Files
coder/coderd/database/migrations/000380_task_name_unique.up.sql
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

2 lines
225 B
SQL
Raw Normal View History

CREATE UNIQUE INDEX IF NOT EXISTS tasks_owner_id_name_unique_idx ON tasks (owner_id, LOWER(name)) WHERE deleted_at IS NULL;
COMMENT ON INDEX tasks_owner_id_name_unique_idx IS 'Index to ensure uniqueness for task owner/name';