-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
855a285
commit d6f90af
Showing
7 changed files
with
56 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...db/prisma/migrations/20221206182055_add_workspace_id_index_in_typebot_table/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- CreateIndex | ||
CREATE INDEX CONCURRENTLY "Typebot_workspaceId_idx" ON "Typebot"("workspaceId"); |
2 changes: 2 additions & 0 deletions
2
packages/db/prisma/migrations/20221206182113_add_created_at_index_in_result/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- CreateIndex | ||
CREATE INDEX CONCURRENTLY "Result_createdAt_idx" ON "Result"("createdAt"); |
2 changes: 2 additions & 0 deletions
2
packages/db/prisma/migrations/20221206182126_add_has_started_index_in_result/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- CreateIndex | ||
CREATE INDEX CONCURRENTLY "Result_hasStarted_idx" ON "Result"("hasStarted"); |
23 changes: 23 additions & 0 deletions
23
packages/db/prisma/migrations/20221207070502_optimize_result_indexes/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
-- DropIndex | ||
DROP INDEX IF EXISTS "Result_createdAt_idx"; | ||
|
||
-- DropIndex | ||
DROP INDEX IF EXISTS "Result_hasStarted_idx"; | ||
|
||
-- DropIndex | ||
DROP INDEX IF EXISTS "Result_typebotId_idx"; | ||
|
||
-- CreateIndex | ||
CREATE INDEX IF NOT EXISTS "Answer_storageUsed_idx" ON "Answer"("storageUsed") | ||
WHERE | ||
"storageUsed" IS NOT NULL; | ||
|
||
-- CreateIndex | ||
CREATE INDEX IF NOT EXISTS "Result_typebotId_createdAt_idx" ON "Result"("typebotId", "createdAt" DESC NULLS LAST) | ||
WHERE | ||
"hasStarted" = true; | ||
|
||
-- CreateIndex | ||
CREATE INDEX IF NOT EXISTS "Result_createdAt_typebotId_idx" ON "Result"("createdAt" DESC NULLS LAST, "typebotId") | ||
WHERE | ||
"hasStarted" = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters