feat: add index for snapshots (#8163)

This commit is contained in:
darkskygit
2024-09-08 13:49:40 +00:00
parent 57083905ff
commit 2a135d8a93
5 changed files with 31 additions and 15 deletions
+2 -1
View File
@@ -262,7 +262,8 @@ model Snapshot {
// we need to clear all hanging updates and snapshots before enable the foreign key on workspaceId
// workspace Workspace @relation(fields: [workspaceId], references: [id], onDelete: Cascade)
@@id([id, workspaceId])
@@id([workspaceId, id])
@@index([workspaceId, updatedAt])
@@map("snapshots")
}