mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-23 05:46:20 +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[]
|
participants Participant[]
|
||||||
watchers Watcher[]
|
watchers Watcher[]
|
||||||
comments Comment[]
|
comments Comment[]
|
||||||
votes Vote[]
|
|
||||||
|
|
||||||
@@index([userId], type: Hash)
|
@@index([userId], type: Hash)
|
||||||
@@map("polls")
|
@@map("polls")
|
||||||
|
@ -220,14 +219,12 @@ model Vote {
|
||||||
participant Participant @relation(fields: [participantId], references: [id], onDelete: Cascade)
|
participant Participant @relation(fields: [participantId], references: [id], onDelete: Cascade)
|
||||||
participantId String @map("participant_id")
|
participantId String @map("participant_id")
|
||||||
optionId String @map("option_id")
|
optionId String @map("option_id")
|
||||||
poll Poll @relation(fields: [pollId], references: [id])
|
|
||||||
pollId String @map("poll_id")
|
pollId String @map("poll_id")
|
||||||
type VoteType @default(yes)
|
type VoteType @default(yes)
|
||||||
createdAt DateTime @default(now()) @map("created_at")
|
createdAt DateTime @default(now()) @map("created_at")
|
||||||
updatedAt DateTime? @updatedAt @map("updated_at")
|
updatedAt DateTime? @updatedAt @map("updated_at")
|
||||||
|
|
||||||
@@index([participantId], type: Hash)
|
@@index([participantId], type: Hash)
|
||||||
@@index([pollId], type: Hash)
|
|
||||||
@@map("votes")
|
@@map("votes")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue