add index to created_at columns
This commit is contained in:
parent
61be400365
commit
4d1b8bb11e
@ -0,0 +1,17 @@
|
|||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "Invoice.created_at_index" ON "Invoice"("created_at");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "Item.created_at_index" ON "Item"("created_at");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "ItemAct.created_at_index" ON "ItemAct"("created_at");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "Mention.created_at_index" ON "Mention"("created_at");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "Withdrawl.created_at_index" ON "Withdrawl"("created_at");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "users.created_at_index" ON "users"("created_at");
|
@ -33,6 +33,7 @@ model User {
|
|||||||
tipDefault Int @default(0)
|
tipDefault Int @default(0)
|
||||||
pubkey String? @unique
|
pubkey String? @unique
|
||||||
|
|
||||||
|
@@index([createdAt])
|
||||||
@@map(name: "users")
|
@@map(name: "users")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,6 +69,7 @@ model Item {
|
|||||||
path Unsupported("LTREE")?
|
path Unsupported("LTREE")?
|
||||||
|
|
||||||
User User[] @relation("Item")
|
User User[] @relation("Item")
|
||||||
|
@@index([createdAt])
|
||||||
@@index([userId])
|
@@index([userId])
|
||||||
@@index([parentId])
|
@@index([parentId])
|
||||||
}
|
}
|
||||||
@ -92,6 +94,7 @@ model ItemAct {
|
|||||||
@@index([itemId])
|
@@index([itemId])
|
||||||
@@index([userId])
|
@@index([userId])
|
||||||
@@index([act])
|
@@index([act])
|
||||||
|
@@index([createdAt])
|
||||||
}
|
}
|
||||||
|
|
||||||
model Mention {
|
model Mention {
|
||||||
@ -104,6 +107,7 @@ model Mention {
|
|||||||
userId Int
|
userId Int
|
||||||
|
|
||||||
@@unique([itemId, userId])
|
@@unique([itemId, userId])
|
||||||
|
@@index([createdAt])
|
||||||
@@index([itemId])
|
@@index([itemId])
|
||||||
@@index([userId])
|
@@index([userId])
|
||||||
}
|
}
|
||||||
@ -123,6 +127,7 @@ model Invoice {
|
|||||||
msatsReceived Int?
|
msatsReceived Int?
|
||||||
cancelled Boolean @default(false)
|
cancelled Boolean @default(false)
|
||||||
|
|
||||||
|
@@index([createdAt])
|
||||||
@@index([userId])
|
@@index([userId])
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,7 +155,7 @@ model Withdrawl {
|
|||||||
msatsFeePaid Int?
|
msatsFeePaid Int?
|
||||||
|
|
||||||
status WithdrawlStatus?
|
status WithdrawlStatus?
|
||||||
|
@@index([createdAt])
|
||||||
@@index([userId])
|
@@index([userId])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user