Skip to content

Commit 2959b4c

Browse files
committed
db: add indices to speed up queries
1 parent 15f9385 commit 2959b4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/db/prisma/schema.prisma

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ model Category {
9696
published Boolean
9797
updatedAt DateTime @updatedAt()
9898
isDeleted Boolean @default(false)
99+
100+
@@index([name])
99101
}
100102

101103
model Group {
@@ -439,6 +441,7 @@ model Corporation {
439441
@@index([homeStationId])
440442
@@index([allianceId])
441443
@@index([ceoId])
444+
@@index([name])
442445
}
443446

444447
model Station {
@@ -506,6 +509,8 @@ model Region {
506509
updatedAt DateTime @updatedAt()
507510
isDeleted Boolean @default(false)
508511
constellations Constellation[]
512+
513+
@@index([name])
509514
}
510515

511516
// TODO: Add missing "position" field
@@ -693,6 +698,7 @@ model LoyaltyStoreOfferRequiredItem {
693698
@@id([offerId, corporationId, typeId])
694699
@@index([offerId, corporationId])
695700
@@index([typeId])
701+
@@index([corporationId])
696702
}
697703

698704
model Killmail {

0 commit comments

Comments
 (0)