fix: add composite index on SecondaryEmail for email verification queries (#27357)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Alex van Andel
2026-01-28 14:53:31 -03:00
committed by GitHub
co-authored by Devin AI
parent 620445d85f
commit 906ba99d3c
2 changed files with 3 additions and 0 deletions
@@ -0,0 +1,2 @@
-- CreateIndex
CREATE INDEX IF NOT EXISTS "SecondaryEmail_email_emailVerified_idx" ON "public"."SecondaryEmail"("email", "emailVerified");
+1
View File
@@ -2172,6 +2172,7 @@ model SecondaryEmail {
@@unique([email])
@@unique([userId, email])
@@index([userId])
@@index([email, emailVerified])
}
// Needed to store tasks that need to be processed by a background worker or Tasker