Skip to content

Commit

Permalink
[back] 🐛 fix: email constrait
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnPetros committed Nov 30, 2024
1 parent 22a978c commit a349a7e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
Warnings:
- A unique constraint covering the columns `[email]` on the table `users` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "users_email_key" ON "users"("email");
2 changes: 1 addition & 1 deletion apps/server/src/database/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ model InventoryMovement {

model User {
id String @id @default(uuid())
email String
email String @unique()
role UserRole @default(EMPLOYEE)
name String
password String
Expand Down

0 comments on commit a349a7e

Please sign in to comment.