PrismaP
Prisma2y ago
3 replies
FrancyMak

Default value not working inside a type

Hello I am having a small problem with prism. Basically I can't put default values on the types, as you can see from the screenshot I have inserted a new temporary user and this user has null in the column where that type should be.

"@prisma/client": "^5.17.0"
"prisma": "^5.18.0"

model Staff {
  id      String   @id @default(auto()) @map("_id") @db.ObjectId
  discordId  String   @unique
  discordName String
  message Message
}

... other stuff

type Message {
  weekly Int    @default(0)
  total  Int    @default(0)
}
CleanShot_2024-08-12_at_23.12.232x.png
Was this page helpful?