Add dbgenerated default for displayId
All checks were successful
Build & Push / Build Server (push) Successful in 57s
Build & Push / Build Client (push) Successful in 41s

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 <noreply@anthropic.com>
This commit is contained in:
2026-03-30 20:58:44 -04:00
parent a19a9a6ccd
commit 64477529ea

View File

@@ -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