Skip to content

Commit a63d427

Browse files
authored
chore: add unique org name constraint to db (coder#13311)
1 parent 4af0f09 commit a63d427

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

coderd/database/dump.sql

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE ONLY organizations
2+
DROP CONSTRAINT IF EXISTS organizations_name;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE ONLY organizations
2+
ADD CONSTRAINT organizations_name UNIQUE (name);

coderd/database/unique_constraint.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)