add action state indices
This commit is contained in:
parent
6c6d2dab18
commit
501ac9f220
|
@ -0,0 +1,20 @@
|
|||
-- CreateIndex
|
||||
CREATE INDEX "Invoice_actionState_idx" ON "Invoice"("actionState");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "Invoice_actionType_idx" ON "Invoice"("actionType");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "Item_invoiceActionState_idx" ON "Item"("invoiceActionState");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "ItemAct_invoiceActionState_idx" ON "ItemAct"("invoiceActionState");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "PollBlindVote_invoiceActionState_idx" ON "PollBlindVote"("invoiceActionState");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "PollVote_invoiceActionState_idx" ON "PollVote"("invoiceActionState");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "Upload_invoiceActionState_idx" ON "Upload"("invoiceActionState");
|
|
@ -332,6 +332,7 @@ model Upload {
|
|||
@@index([createdAt], map: "Upload.created_at_index")
|
||||
@@index([userId], map: "Upload.userId_index")
|
||||
@@index([invoiceId])
|
||||
@@index([invoiceActionState])
|
||||
}
|
||||
|
||||
model Earn {
|
||||
|
@ -484,6 +485,7 @@ model Item {
|
|||
@@index([weightedDownVotes], map: "Item.weightedDownVotes_index")
|
||||
@@index([weightedVotes], map: "Item.weightedVotes_index")
|
||||
@@index([invoiceId])
|
||||
@@index([invoiceActionState])
|
||||
}
|
||||
|
||||
// we use this to denormalize a user's aggregated interactions (zaps) with an item
|
||||
|
@ -577,6 +579,7 @@ model PollVote {
|
|||
|
||||
@@index([pollOptionId], map: "PollVote.pollOptionId_index")
|
||||
@@index([invoiceId])
|
||||
@@index([invoiceActionState])
|
||||
}
|
||||
|
||||
model PollBlindVote {
|
||||
|
@ -593,6 +596,7 @@ model PollBlindVote {
|
|||
|
||||
@@unique([itemId, userId], map: "PollBlindVote.itemId_userId_unique")
|
||||
@@index([userId], map: "PollBlindVote.userId_index")
|
||||
@@index([invoiceActionState])
|
||||
}
|
||||
|
||||
enum BillingType {
|
||||
|
@ -731,6 +735,7 @@ model ItemAct {
|
|||
@@index([itemId], map: "Vote.itemId_index")
|
||||
@@index([userId], map: "Vote.userId_index")
|
||||
@@index([invoiceId])
|
||||
@@index([invoiceActionState])
|
||||
}
|
||||
|
||||
model Mention {
|
||||
|
@ -821,6 +826,8 @@ model Invoice {
|
|||
@@index([createdAt], map: "Invoice.created_at_index")
|
||||
@@index([userId], map: "Invoice.userId_index")
|
||||
@@index([confirmedIndex], map: "Invoice.confirmedIndex_index")
|
||||
@@index([actionState])
|
||||
@@index([actionType])
|
||||
}
|
||||
|
||||
model Withdrawl {
|
||||
|
|
Loading…
Reference in New Issue