Skip to content

Commit ba19ba2

Browse files
committed
fix: Added indexing
1 parent feca76a commit ba19ba2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/backend/prisma/schema.prisma

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,10 @@ model Card {
124124
125125
cardLinks CardLink[]
126126
views CardView[]
127+
127128
128129
@@map("cards")
129-
@@index([slug])
130+
@@index([userId])
130131
@@index([viewCount])
131132
}
132133

@@ -175,6 +176,8 @@ model CardView {
175176
viewer User? @relation("cardViewer", fields: [viewerId], references: [id], onDelete: SetNull)
176177
177178
@@map("card_views")
179+
@@index([cardId])
180+
@@index([ownerId])
178181
}
179182

180183
model FollowLog {

0 commit comments

Comments
 (0)