feat: 优化接口速度
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
-- CreateIndex
|
||||
CREATE INDEX "windows_recordId_idx" ON "windows"("recordId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "screenshots_recordId_idx" ON "screenshots"("recordId");
|
||||
@@ -55,6 +55,8 @@ model Window {
|
||||
|
||||
// Relations
|
||||
record Record @relation(fields: [recordId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([recordId])
|
||||
|
||||
@@map("windows")
|
||||
}
|
||||
@@ -71,7 +73,8 @@ model Screenshot {
|
||||
|
||||
// Relations
|
||||
record Record @relation(fields: [recordId], references: [id], onDelete: Cascade)
|
||||
|
||||
|
||||
@@index([recordId])
|
||||
@@index([objectName])
|
||||
@@map("screenshots")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user