From 565f2b7157b10beef791f30c0c1b1681a49fbd2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Gierwia=C5=82o?= Date: Sat, 6 Dec 2025 13:45:34 +0100 Subject: [PATCH] fix(migration): add missing suggestion_id column to matches table --- .../migration.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 backend/prisma/migrations/20251206124000_add_suggestion_id_to_matches/migration.sql diff --git a/backend/prisma/migrations/20251206124000_add_suggestion_id_to_matches/migration.sql b/backend/prisma/migrations/20251206124000_add_suggestion_id_to_matches/migration.sql new file mode 100644 index 0000000..77021f2 --- /dev/null +++ b/backend/prisma/migrations/20251206124000_add_suggestion_id_to_matches/migration.sql @@ -0,0 +1,11 @@ +-- AlterTable +ALTER TABLE "matches" ADD COLUMN "suggestion_id" INTEGER; + +-- CreateIndex +CREATE UNIQUE INDEX "matches_suggestion_id_key" ON "matches"("suggestion_id"); + +-- CreateIndex +CREATE INDEX "matches_suggestion_id_idx" ON "matches"("suggestion_id"); + +-- AddForeignKey +ALTER TABLE "matches" ADD CONSTRAINT "matches_suggestion_id_fkey" FOREIGN KEY ("suggestion_id") REFERENCES "recording_suggestions"("id") ON DELETE SET NULL ON UPDATE CASCADE;