From bfbaa1abd4020091abbdaf6ef8bf47e8bf19707c Mon Sep 17 00:00:00 2001 From: hpkoh Date: Fri, 21 Oct 2022 23:56:07 +0800 Subject: [PATCH] [questions][feat] add sorting index --- apps/portal/prisma/schema.prisma | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/portal/prisma/schema.prisma b/apps/portal/prisma/schema.prisma index c068d7aa..a08224f7 100644 --- a/apps/portal/prisma/schema.prisma +++ b/apps/portal/prisma/schema.prisma @@ -408,6 +408,9 @@ model QuestionsQuestion { votes QuestionsQuestionVote[] comments QuestionsQuestionComment[] answers QuestionsAnswer[] + + @@index([lastSeenAt, id]) + @@index([upvotes, id]) } model QuestionsQuestionEncounter {