️ Remove redundant index on votes table (#1050)

This commit is contained in:
Luke Vella 2024-03-09 10:17:40 +05:30 committed by GitHub
parent fe856d6c7d
commit 247085869d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -0,0 +1,2 @@
-- DropIndex
DROP INDEX "votes_poll_id_idx";

View file

@ -144,7 +144,6 @@ model Poll {
participants Participant[]
watchers Watcher[]
comments Comment[]
votes Vote[]
@@index([userId], type: Hash)
@@map("polls")
@ -220,14 +219,12 @@ model Vote {
participant Participant @relation(fields: [participantId], references: [id], onDelete: Cascade)
participantId String @map("participant_id")
optionId String @map("option_id")
poll Poll @relation(fields: [pollId], references: [id])
pollId String @map("poll_id")
type VoteType @default(yes)
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime? @updatedAt @map("updated_at")
@@index([participantId], type: Hash)
@@index([pollId], type: Hash)
@@map("votes")
}