emailにUnique制約を追加

This commit is contained in:
rca 2024-06-16 21:22:21 +09:00
parent 454403d83e
commit 297e0c3df4
2 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,8 @@
/*
Warnings:
- A unique constraint covering the columns `[email]` on the table `User` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");

View File

@ -15,7 +15,7 @@ datasource db {
model User {
id String @id @default(cuid())
email String
email String @unique
password String
name String
created_at DateTime @default(now())