mirror of
https://gitlab.com/mobicoop/v3/service/user.git
synced 2025-12-31 04:12:40 +00:00
add phone
This commit is contained in:
5
prisma/migrations/20221219143521_phone/migration.sql
Normal file
5
prisma/migrations/20221219143521_phone/migration.sql
Normal 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;
|
||||
8
prisma/migrations/20221219145046_phone/migration.sql
Normal file
8
prisma/migrations/20221219145046_phone/migration.sql
Normal 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");
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user