Enable comment deletion on CommentDrawer (#460)
* Enable comment deletion on people and companies page * Add storybook test
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "comments" DROP CONSTRAINT "comments_commentThreadId_fkey";
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "comments" ADD CONSTRAINT "comments_commentThreadId_fkey" FOREIGN KEY ("commentThreadId") REFERENCES "comment_threads"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@ -0,0 +1,5 @@
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "comment_thread_targets" DROP CONSTRAINT "comment_thread_targets_commentThreadId_fkey";
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "comment_thread_targets" ADD CONSTRAINT "comment_thread_targets_commentThreadId_fkey" FOREIGN KEY ("commentThreadId") REFERENCES "comment_threads"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@ -255,7 +255,7 @@ model Comment {
|
||||
authorId String
|
||||
author User @relation(fields: [authorId], references: [id])
|
||||
commentThreadId String
|
||||
commentThread CommentThread @relation(fields: [commentThreadId], references: [id])
|
||||
commentThread CommentThread @relation(fields: [commentThreadId], references: [id], onDelete: Cascade)
|
||||
/// @TypeGraphQL.omit(input: true, output: true)
|
||||
workspaceId String
|
||||
/// @TypeGraphQL.omit(input: true, output: true)
|
||||
@ -275,7 +275,7 @@ model CommentThreadTarget {
|
||||
updatedAt DateTime @updatedAt
|
||||
deletedAt DateTime?
|
||||
commentThreadId String
|
||||
commentThread CommentThread @relation(fields: [commentThreadId], references: [id])
|
||||
commentThread CommentThread @relation(fields: [commentThreadId], references: [id], onDelete: Cascade)
|
||||
|
||||
commentableType CommentableType
|
||||
commentableId String
|
||||
|
||||
Reference in New Issue
Block a user