Replace hard deletes with deletedAt timestamp flags on all three entities. Deleting a client or project only sets its own deletedAt; child records are excluded implicitly by filtering on parent deletedAt in every read query. Raw SQL statistics queries also filter out soft-deleted parents. FK ON DELETE CASCADE removed from Project→Client and TimeEntry→Project.
10 KiB
10 KiB