Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Improve search responsiveness for group-constrained queries
CREATE INDEX IF NOT EXISTS "challenge_groups_gin_idx"
ON "challenges"."Challenge"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
Ensure that the groups column is of a type that supports GIN indexing, such as jsonb or array. If it is not, the index may not function as expected.

USING GIN ("groups");
1 change: 1 addition & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ model Challenge {
@@index([updatedAt])
@@index([typeId])
@@index([trackId])
@@index([groups], type: Gin, map: "challenge_groups_gin_idx")
@@index([submissionStartDate])
@@index([submissionEndDate])
@@index([registrationStartDate])
Expand Down
Loading