To create Referencial actions in Prisma, you have to define what should happen on delete
model Post {
id Int @id @default(autoincrement())
title String
author User @relation(fields: [authorId], references: [id], onDelete: Cascade)
authorId Int @unique
}
model User {
id Int @id @default(autoincrement())
posts Post[]
}