fix(migration): add missing suggestion_id column to matches table

This commit is contained in:
Radosław Gierwiało
2025-12-06 13:45:34 +01:00
parent 2ce7beecca
commit 565f2b7157

View File

@@ -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;