Skip to content

Commit

Permalink
feat: add composite unique index to Hacker table
Browse files Browse the repository at this point in the history
Ensure unique constraint on userId and hackathonId columns. This prevents duplicate entries and enforces data integrity for hacker-hackathon pairs.
  • Loading branch information
MatejMa2ur committed Oct 15, 2024
1 parent 00a6abd commit bcc1991
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
Warnings:
- A unique constraint covering the columns `[userId,hackathonId]` on the table `Hacker` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "Hacker_userId_hackathonId_key" ON "Hacker"("userId", "hackathonId");

0 comments on commit bcc1991

Please sign in to comment.