Skip to content

Commit

Permalink
Prisma Migration - User Service (#197)
Browse files Browse the repository at this point in the history
* user service

* restate mongodb logic

* fixes to interface and implementation

* include unique constraint on auth_id
  • Loading branch information
rodrigotiscareno authored Aug 8, 2024
1 parent 74a5fd0 commit d152b93
Show file tree
Hide file tree
Showing 4 changed files with 419 additions and 521 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ CREATE TABLE "users" (

CONSTRAINT "users_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "users_auth_id_key" ON "users"("auth_id");
2 changes: 1 addition & 1 deletion backend/typescript/models/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ model users {
id Int @id @default(autoincrement())
first_name String @db.VarChar(255)
last_name String @db.VarChar(255)
auth_id String @db.VarChar(255)
auth_id String @unique @db.VarChar(255)
role enum_users_role
createdAt DateTime? @db.Timestamptz(6)
updatedAt DateTime? @db.Timestamptz(6)
Expand Down
Loading

0 comments on commit d152b93

Please sign in to comment.