Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🗃️ Remove unused unique indexes from database

Luke Vella3f94a0e276f8
diff --git a/packages/database/prisma/migrations/20230318113511_remove_unecessary_unique_indexes/migration.sql b/packages/database/prisma/migrations/20230318113511_remove_unecessary_unique_indexes/migration.sql
new file mode 100644
index 000000000..28d9480f2
--- /dev/null
+++ b/packages/database/prisma/migrations/20230318113511_remove_unecessary_unique_indexes/migration.sql
@@ -0,0 +1,8 @@
+-- DropIndex
+DROP INDEX "Comment_id_pollId_key";
+
+-- DropIndex
+DROP INDEX "comments_id_poll_id_key";
+
+-- DropIndex
+DROP INDEX "participants_id_poll_id_key";
diff --git a/packages/database/prisma/schema.prisma b/packages/database/prisma/schema.prisma
index 3a45639d5..d85f1f662 100644
--- a/packages/database/prisma/schema.prisma
+++ b/packages/database/prisma/schema.prisma
@@ -71,7 +71,6 @@ model Participant {
updatedAt DateTime? @updatedAt @map("updated_at")
@@index([pollId], type: Hash)
- @@unique([id, pollId])
@@map("participants")
}
@@ -122,7 +121,6 @@ model Comment {
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime? @updatedAt @map("updated_at")
- @@unique([id, pollId])
@@index([userId], type: Hash)
@@index([pollId], type: Hash)
@@map("comments")