-
Notifications
You must be signed in to change notification settings - Fork 0
"Consider adding soft-delete support" #5
Copy link
Copy link
Open
Description
CodeRabbit suggestion/nitpick comment on Ticket entity:
"Removing cascade operations aligns with the requirement to preserve whistleblower data.
However, without cascade and without explicit ON DELETE constraints at the DB level, attempting to delete a Ticket will either:
- Fail with a FK constraint violation (desired behavior), or
- Leave orphaned
TicketComment,Attachment, andAuditLogrows if FK constraints aren't enforced
To ensure data integrity, consider implementing a soft-delete pattern (e.g., an isDeleted or deletedAt field) and preventing hard deletes at the service layer. This makes the intent explicit and avoids relying solely on DB constraint behavior.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels