Skip to content

Commit

Permalink
🗃️ Add typebotId index on Result table
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Oct 20, 2022
1 parent 57c814c commit f8e770c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- DropIndex
DROP INDEX "Answer_resultId_idx";
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- CreateIndex
CREATE INDEX CONCURRENTLY "Result_typebotId_idx" ON "Result"("typebotId");
3 changes: 2 additions & 1 deletion packages/db/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ model Result {
typebot Typebot @relation(fields: [typebotId], references: [id], onDelete: Cascade)
answers Answer[]
logs Log[]
@@index([typebotId])
}

model Log {
Expand All @@ -242,7 +244,6 @@ model Answer {
result Result @relation(fields: [resultId], references: [id], onDelete: Cascade)
@@unique([resultId, blockId, groupId])
@@index([resultId])
}

model Coupon {
Expand Down

0 comments on commit f8e770c

Please sign in to comment.