Skip to content
Snippets Groups Projects
Verified Commit d2a3d100 authored by Martin Claesson's avatar Martin Claesson
Browse files

perf(Database): :zap: add indexes for Item.InventoryId and Inventory.PartyId...

perf(Database): :zap: add indexes for Item.InventoryId and Inventory.PartyId to improve db performance
parent 67fe753f
Branches
Tags
1 merge request!97perf(Database): :zap: add indexes for Item.InventoryId and Inventory.PartyId...
......@@ -15,6 +15,12 @@ $ yarn start
# generate static project
$ yarn generate
# run migrations for development
$ yarn prisma migrate dev [--name=]
# apply migrations for production
$ yarn prisma migrate deploy
```
For detailed explanation on how things work, check out the [documentation](https://nuxtjs.org).
......
-- CreateIndex
CREATE INDEX "Inventory_partyId_idx" ON "Inventory"("partyId");
-- CreateIndex
CREATE INDEX "Item_inventoryId_idx" ON "Item"("inventoryId");
......@@ -58,6 +58,7 @@ model Inventory {
updatedAt DateTime? @updatedAt
@@unique([partyId, order])
@@index([partyId])
}
model Item {
......@@ -74,6 +75,8 @@ model Item {
deletedAt DateTime?
createdAt DateTime @default(now())
updatedAt DateTime? @updatedAt
@@index([inventoryId])
}
model KnownItem {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment