fix: add cascade delete for audit logs

This commit is contained in:
David Nguyen
2024-01-30 18:37:48 +11:00
parent 9427143951
commit 1bda74b3aa
2 changed files with 2 additions and 2 deletions

View File

@@ -14,4 +14,4 @@ CREATE TABLE "UserSecurityAuditLog" (
);
-- AddForeignKey
ALTER TABLE "UserSecurityAuditLog" ADD CONSTRAINT "UserSecurityAuditLog_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE "UserSecurityAuditLog" ADD CONSTRAINT "UserSecurityAuditLog_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;