Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: add unique org name constraint to db
  • Loading branch information
aslilac committed May 17, 2024
commit 59d5bc293043528a934d77f2dc2d424ed88bbb26
2 changes: 2 additions & 0 deletions coderd/database/migrations/000210_unique_org_name.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE ONLY organizations
DROP CONSTRAINT IF EXISTS organizations_name;
2 changes: 2 additions & 0 deletions coderd/database/migrations/000210_unique_org_name.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE ONLY organizations
ADD CONSTRAINT organizations_name UNIQUE (name);