Skip to content

"Consider adding soft-delete support" #5

@simonforsberg

Description

@simonforsberg

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, and AuditLog rows 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions