add phone

This commit is contained in:
Gsk54
2022-12-21 16:15:57 +01:00
parent 5d8eb42ae6
commit 7effaa7c40
12 changed files with 50 additions and 17 deletions

View File

@@ -0,0 +1,5 @@
-- AlterTable
ALTER TABLE "user" ADD COLUMN "phone" TEXT,
ALTER COLUMN "firstName" DROP NOT NULL,
ALTER COLUMN "lastName" DROP NOT NULL,
ALTER COLUMN "email" DROP NOT NULL;

View File

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

View File

@@ -12,9 +12,10 @@ datasource db {
model User {
uuid String @id @default(uuid()) @db.Uuid
firstName String
lastName String
email String @unique
firstName String?
lastName String?
email String? @unique
phone String? @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt