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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user