From d1e3550e7b65087f12698c2cb92e73e4a2aa8756 Mon Sep 17 00:00:00 2001 From: gmbronco <83549293+gmbronco@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:10:07 +0100 Subject: [PATCH] add index to snapshots --- .changeset/twenty-wombats-yawn.md | 5 +++++ .../migrations/20241220090915_snapshots_index/migration.sql | 2 ++ prisma/schema.prisma | 1 + prisma/schema/pool.prisma | 1 + 4 files changed, 9 insertions(+) create mode 100644 .changeset/twenty-wombats-yawn.md create mode 100644 prisma/migrations/20241220090915_snapshots_index/migration.sql diff --git a/.changeset/twenty-wombats-yawn.md b/.changeset/twenty-wombats-yawn.md new file mode 100644 index 000000000..7f50b4eea --- /dev/null +++ b/.changeset/twenty-wombats-yawn.md @@ -0,0 +1,5 @@ +--- +'backend': patch +--- + +add index to snapshots diff --git a/prisma/migrations/20241220090915_snapshots_index/migration.sql b/prisma/migrations/20241220090915_snapshots_index/migration.sql new file mode 100644 index 000000000..2f9a68388 --- /dev/null +++ b/prisma/migrations/20241220090915_snapshots_index/migration.sql @@ -0,0 +1,2 @@ +-- CreateIndex +CREATE INDEX "PrismaPoolSnapshot_poolId_chain_idx" ON "PrismaPoolSnapshot"("poolId", "chain"); diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 30beca580..cc401504c 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -555,6 +555,7 @@ model PrismaPoolSnapshot { @@index([protocolVersion]) @@index([timestamp(sort: Desc)]) + @@index([poolId, chain]) } model PrismaReliquaryFarmSnapshot { diff --git a/prisma/schema/pool.prisma b/prisma/schema/pool.prisma index 18897986f..0158e7c1d 100644 --- a/prisma/schema/pool.prisma +++ b/prisma/schema/pool.prisma @@ -495,6 +495,7 @@ model PrismaPoolSnapshot { @@index([protocolVersion]) @@index([timestamp(sort: Desc)]) + @@index([poolId, chain]) } model PrismaReliquaryFarmSnapshot {