From 64477529eafa12307cda68fd758d8b6036afb4e4 Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 30 Mar 2026 20:58:44 -0400 Subject: [PATCH] Add dbgenerated default for displayId prisma db push cannot add a non-nullable column to an existing table without a database-level default. Using a PostgreSQL expression to generate V + 9 random digits as the fallback default. Co-Authored-By: Claude Sonnet 4.6 --- server/prisma/schema.prisma | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/prisma/schema.prisma b/server/prisma/schema.prisma index b7d8317..e45b02c 100644 --- a/server/prisma/schema.prisma +++ b/server/prisma/schema.prisma @@ -67,7 +67,7 @@ model Item { model Ticket { id String @id @default(cuid()) - displayId String @unique + displayId String @unique @default(dbgenerated("concat('V', (floor(random() * 900000000) + 100000000)::bigint::text)")) title String overview String severity Int