model Comment {
id Int @id @default(autoincrement())
reply Comment? @relation(fields: [replyId], references: [id], onDelete: SetNull)
replyId Int? @default(null)
comment String
}
Here both reply and replyId are nullable, but when I try to migrate I get this error:
error: Error parsing attribute "@default": Expected a numeric value, but received literal value "Null".
--> schema.prisma:70
|
69 | reply Comment? @relation(fields: [replyId], references: [id], onDelete: SetNull)
70 | replyId Int? @default(null)
|
Can anyone explain the problem?