Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
hotfix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspermayone committed Jul 17, 2024
1 parent 0e12cd0 commit 2b53995
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions prisma/migrations/20240717212750_fix_errors/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-- AlterTable
ALTER TABLE "Message" ADD COLUMN "threadId" TEXT;

-- CreateTable
CREATE TABLE "Thread" (
"id" TEXT NOT NULL,
"ts" TEXT NOT NULL,
"messageId" TEXT NOT NULL,

CONSTRAINT "Thread_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "Thread_id_key" ON "Thread"("id");

-- CreateIndex
CREATE UNIQUE INDEX "Thread_ts_key" ON "Thread"("ts");

-- AddForeignKey
ALTER TABLE "Message" ADD CONSTRAINT "Message_threadId_fkey" FOREIGN KEY ("threadId") REFERENCES "Thread"("id") ON DELETE SET NULL ON UPDATE CASCADE;

0 comments on commit 2b53995

Please sign in to comment.