mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-22 05:16:23 +02:00
⚡️ Remove redundant index on votes table (#1050)
This commit is contained in:
parent
fe856d6c7d
commit
247085869d
2 changed files with 2 additions and 3 deletions
|
@ -0,0 +1,2 @@
|
|||
-- DropIndex
|
||||
DROP INDEX "votes_poll_id_idx";
|
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue