P
Prisma•4mo ago
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)
}
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)
}
No description
2 Replies
FrancyMak
FrancyMakOP•4mo ago
Models | Prisma Documentation
Learn about the concepts for building your data model with Prisma: Models, scalar types, enums, attributes, functions, IDs, default values and more.
Want results from more Discord servers?
Add your server