make user full name mandatory

This commit is contained in:
m5r
2021-09-25 22:16:31 +08:00
parent 9d30930f96
commit 9cec49f255
8 changed files with 26 additions and 17 deletions

View File

@ -0,0 +1,9 @@
/*
Warnings:
- You are about to drop the column `name` on the `User` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "User" DROP COLUMN "name",
ADD COLUMN "fullName" TEXT NOT NULL DEFAULT E'';

View File

@ -69,7 +69,7 @@ model User {
id String @id @default(uuid())
createdAt DateTime @default(now()) @db.Timestamptz
updatedAt DateTime @updatedAt @db.Timestamptz
name String?
fullName String @default("")
email String @unique
hashedPassword String?
role GlobalRole @default(CUSTOMER)