Skip to content

Commit

Permalink
User Email Optionality (#33)
Browse files Browse the repository at this point in the history
* Optional Email

* Revert Changes
  • Loading branch information
VarMattew authored Jul 30, 2024
1 parent fec8192 commit f23734f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "User" ALTER COLUMN "email" DROP NOT NULL;
2 changes: 1 addition & 1 deletion apps/backend/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ enum Gender {

model User {
authSchId String @id
email String @unique
email String? @unique
firstName String
lastName String
gender Gender?
Expand Down
4 changes: 2 additions & 2 deletions apps/backend/src/users/entities/user.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export class User {
* @example '[email protected]'
*/
@IsString()
@IsNotEmpty()
email: string;
@IsOptional()
email?: string;

/**
* First Name.
Expand Down

0 comments on commit f23734f

Please sign in to comment.