Skip to content

Commit

Permalink
cascade
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamics committed Dec 4, 2023
1 parent fb92ac0 commit f9426be
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
-- DropForeignKey
ALTER TABLE "ActivityLog" DROP CONSTRAINT "ActivityLog_performedById_fkey";

-- DropForeignKey
ALTER TABLE "LastReadMessage" DROP CONSTRAINT "LastReadMessage_lastMessageId_fkey";

-- DropForeignKey
ALTER TABLE "LastReadMessage" DROP CONSTRAINT "LastReadMessage_userId_fkey";

Expand All @@ -19,6 +22,9 @@ ALTER TABLE "UserOrganizationRole" ADD CONSTRAINT "UserOrganizationRole_userId_f
-- AddForeignKey
ALTER TABLE "Messages" ADD CONSTRAINT "Messages_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "LastReadMessage" ADD CONSTRAINT "LastReadMessage_lastMessageId_fkey" FOREIGN KEY ("lastMessageId") REFERENCES "Messages"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "LastReadMessage" ADD CONSTRAINT "LastReadMessage_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;

Expand Down

0 comments on commit f9426be

Please sign in to comment.