Skip to content

Commit 8010f52

Browse files
authored
Rename User relation to author in Post model
1 parent 2bcc421 commit 8010f52

File tree

1 file changed

+2
-2
lines changed
  • content/200-orm/100-prisma-schema/20-data-model/20-relations/410-referential-actions

1 file changed

+2
-2
lines changed

content/200-orm/100-prisma-schema/20-data-model/20-relations/410-referential-actions/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ model Post {
9191
id Int @id @default(autoincrement())
9292
title String
9393
tags TagOnPosts[]
94-
User User? @relation(fields: [userId], references: [id], onDelete: SetNull, onUpdate: Cascade)
95-
userId Int?
94+
author User? @relation(fields: [userId], references: [id], onDelete: SetNull, onUpdate: Cascade)
95+
authorId Int?
9696
}
9797
9898
model TagOnPosts {

0 commit comments

Comments
 (0)