diff --git a/server/prisma/schema.prisma b/server/prisma/schema.prisma index 710acbd..1e43928 100644 --- a/server/prisma/schema.prisma +++ b/server/prisma/schema.prisma @@ -57,6 +57,7 @@ model Type { tickets Ticket[] @@unique([categoryId, name]) + @@index([categoryId]) } model Item { @@ -67,6 +68,7 @@ model Item { tickets Ticket[] @@unique([typeId, name]) + @@index([typeId]) } model Ticket { @@ -141,6 +143,7 @@ model Attachment { @@index([ticketId]) @@index([commentId]) + @@index([uploadedById]) } model Webhook { @@ -195,4 +198,6 @@ model AuditLog { ticket Ticket @relation(fields: [ticketId], references: [id], onDelete: Cascade) user User @relation(fields: [userId], references: [id]) + + @@index([ticketId, createdAt]) }