more indices

This commit is contained in:
keyan 2022-11-06 14:39:23 -06:00
parent b75c8e73b7
commit 9431469453
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,14 @@
-- CreateIndex
CREATE INDEX "Item.weightedVotes_index" ON "Item"("weightedVotes");
-- CreateIndex
CREATE INDEX "Item.weightedDownVotes_index" ON "Item"("weightedDownVotes");
-- CreateIndex
CREATE INDEX "Item.bio_index" ON "Item"("bio");
-- CreateIndex
CREATE INDEX "Item.freebie_index" ON "Item"("freebie");
-- CreateIndex
CREATE INDEX "Item.sumVotes_index" ON "Item"(("weightedVotes" - "weightedDownVotes"));

View File

@ -224,6 +224,10 @@ model Item {
PollOption PollOption[]
PollVote PollVote[]
@@index([weightedVotes])
@@index([weightedDownVotes])
@@index([bio])
@@index([freebie])
@@index([createdAt])
@@index([userId])
@@index([parentId])