-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a migration to add the comments table.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
prisma/migrations/20241128235613_private_brainstorming/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
Warnings: | ||
- A unique constraint covering the columns `[privateBrainstormingIssueId]` on the table `DesignReview` will be added. If there are existing duplicate values, this will fail. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "DesignReview" ADD COLUMN "pendingCommentsFrom" TEXT; | ||
ALTER TABLE "DesignReview" ADD COLUMN "pendingPrivateBrainstormingCommentsFrom" TEXT; | ||
ALTER TABLE "DesignReview" ADD COLUMN "privateBrainstormingIssueId" TEXT; | ||
|
||
-- CreateTable | ||
CREATE TABLE "ReviewComment" ( | ||
"id" TEXT NOT NULL PRIMARY KEY, | ||
"reviewId" TEXT NOT NULL, | ||
"publishedAt" DATETIME NOT NULL, | ||
"updatedAt" DATETIME NOT NULL, | ||
"url" TEXT NOT NULL, | ||
"body" TEXT NOT NULL, | ||
"authorId" TEXT, | ||
"isMinimized" BOOLEAN NOT NULL, | ||
"isPrivateBrainstorming" BOOLEAN NOT NULL, | ||
CONSTRAINT "ReviewComment_reviewId_fkey" FOREIGN KEY ("reviewId") REFERENCES "DesignReview" ("id") ON DELETE CASCADE ON UPDATE CASCADE, | ||
CONSTRAINT "ReviewComment_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "GithubUser" ("id") ON DELETE SET NULL ON UPDATE CASCADE | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "DesignReview_privateBrainstormingIssueId_key" ON "DesignReview"("privateBrainstormingIssueId"); |