Skip to content

Commit

Permalink
cleanup: remove contstraint on org name uniqueness
Browse files Browse the repository at this point in the history
  • Loading branch information
densumesh committed Apr 11, 2024
1 parent 0a30061 commit 4e19105
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- This file should undo anything in `up.sql`
ALTER TABLE organizations ADD CONSTRAINT organizations_name_key UNIQUE (name);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Your SQL goes here
ALTER TABLE organizations DROP CONSTRAINT organizations_name_key;
4 changes: 0 additions & 4 deletions server/src/operators/organization_operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ pub async fn create_organization_query(

let mut number: usize = diesel::insert_into(organizations_columns::organizations)
.values(new_organization.clone())
.on_conflict(on_constraint("organizations_name_key"))
.do_nothing()
.execute(&mut conn)
.await
.map_err(|_| {
Expand All @@ -52,8 +50,6 @@ pub async fn create_organization_query(

number = diesel::insert_into(organizations_columns::organizations)
.values(new_organization.clone())
.on_conflict(on_constraint("organizations_name_key"))
.do_nothing()
.execute(&mut conn)
.await
.map_err(|_| {
Expand Down

0 comments on commit 4e19105

Please sign in to comment.