refactor: change from required to not required
This commit is contained in:
parent
fff5558701
commit
57d2c575bc
3 changed files with 32 additions and 21 deletions
11
prisma/migrations/20240404090554_update/migration.sql
Normal file
11
prisma/migrations/20240404090554_update/migration.sql
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "User" ALTER COLUMN "registrationNo" DROP NOT NULL,
|
||||
ALTER COLUMN "startDate" DROP NOT NULL,
|
||||
ALTER COLUMN "retireDate" DROP NOT NULL,
|
||||
ALTER COLUMN "discountCondition" DROP NOT NULL,
|
||||
ALTER COLUMN "licenseNo" DROP NOT NULL,
|
||||
ALTER COLUMN "licenseIssueDate" DROP NOT NULL,
|
||||
ALTER COLUMN "licenseExpireDate" DROP NOT NULL,
|
||||
ALTER COLUMN "sourceNationality" DROP NOT NULL,
|
||||
ALTER COLUMN "importNationality" DROP NOT NULL,
|
||||
ALTER COLUMN "trainingPlace" DROP NOT NULL;
|
||||
|
|
@ -170,24 +170,24 @@ model User {
|
|||
email String
|
||||
telephoneNo String
|
||||
|
||||
registrationNo String
|
||||
registrationNo String?
|
||||
|
||||
startDate DateTime
|
||||
retireDate DateTime
|
||||
startDate DateTime?
|
||||
retireDate DateTime?
|
||||
|
||||
userType String
|
||||
userRole String
|
||||
|
||||
discountCondition String
|
||||
discountCondition String?
|
||||
|
||||
licenseNo String
|
||||
licenseIssueDate DateTime
|
||||
licenseExpireDate DateTime
|
||||
licenseNo String?
|
||||
licenseIssueDate DateTime?
|
||||
licenseExpireDate DateTime?
|
||||
|
||||
sourceNationality String
|
||||
importNationality String
|
||||
sourceNationality String?
|
||||
importNationality String?
|
||||
|
||||
trainingPlace String
|
||||
trainingPlace String?
|
||||
|
||||
status Status @default(CREATED)
|
||||
|
||||
|
|
|
|||
|
|
@ -37,17 +37,17 @@ type UserCreate = {
|
|||
lastName: string;
|
||||
lastNameEN: string;
|
||||
|
||||
code: string;
|
||||
registrationNo: string;
|
||||
startDate: Date;
|
||||
retireDate: Date;
|
||||
discountCondition: string;
|
||||
licenseNo: string;
|
||||
licenseIssueDate: Date;
|
||||
licenseExpireDate: Date;
|
||||
sourceNationality: string;
|
||||
importNationality: string;
|
||||
trainingPlace: string;
|
||||
code?: string;
|
||||
registrationNo?: string;
|
||||
startDate?: Date;
|
||||
retireDate?: Date;
|
||||
discountCondition?: string;
|
||||
licenseNo?: string;
|
||||
licenseIssueDate?: Date;
|
||||
licenseExpireDate?: Date;
|
||||
sourceNationality?: string;
|
||||
importNationality?: string;
|
||||
trainingPlace?: string;
|
||||
|
||||
address: string;
|
||||
addressEN: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue