Skip to content

Commit

Permalink
fix(prisma): don't require review titles
Browse files Browse the repository at this point in the history
This patch updates the `Review` model to make the `title` attribute
nullable so that we store NULLs in database instead of empty strings.
  • Loading branch information
nicholaschiang committed Jul 23, 2023
1 parent 80f5d55 commit 3aef447
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "Review" ALTER COLUMN "title" DROP NOT NULL,
ALTER COLUMN "title" DROP DEFAULT;
2 changes: 1 addition & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ model Review {
id Int @id @default(autoincrement())
// The review title (usually included as the header on their webpage).
title String @default("")
title String?
// The review subtitle (typically included below the title on their webpage).
subtitle String?
Expand Down

0 comments on commit 3aef447

Please sign in to comment.