From 05050fb4d0aaed66bdde1217392beed751a86107 Mon Sep 17 00:00:00 2001 From: Roman Godmaire Date: Mon, 20 Nov 2023 10:12:24 -0500 Subject: [PATCH] misc: Database Indexes --- prisma/schema.prisma | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index a4b9e9a..648fe59 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -52,6 +52,8 @@ model Track { createdAt DateTime @default(now()) updatedAt DateTime @updatedAt + + @@index([producerId]) } model TrackVersion { @@ -63,6 +65,8 @@ model TrackVersion { comments Comment[] createdAt DateTime @default(now()) updatedAt DateTime @updatedAt + + @@index([trackId]) } model Comment { @@ -77,4 +81,6 @@ model Comment { createdAt DateTime @default(now()) updatedAt DateTime @updatedAt + + @@index([authorId, trackVersionId]) }