Knowledgebase

Soft Deletes and Data Retention Print

  • phplaravel, guide, howto, solution, zillionkinghost, hosting, support
  • 0

Removing records.

WHAT SOFT DELETING IS

Marking a record as deleted rather than removing it.

WHY USE IT

Accidental deletion can be reversed History is preserved Related records are not orphaned

WHAT TO BE CAREFUL WITH

Queries that must exclude deleted records Unique constraints, which still apply to deleted rows Tables growing indefinitely

THE UNIQUE CONSTRAINT POINT

A soft-deleted record still occupies its unique value.

Someone cannot reuse an address or reference until it is genuinely removed.

WHAT TO PLAN

Permanent removal after a retention period.

WHY

Retaining everything forever creates obligations and cost.

WHAT TO ESTABLISH

How long each kind of record is kept What is deleted and what is anonymised

WHAT ANONYMISING MEANS

Removing identifying details while retaining the record for reporting.

WHAT TO IMPLEMENT

A scheduled task applying your retention rules.

WHAT TO DOCUMENT

The retention policy.

WHAT TO CHECK

That deleted records are genuinely excluded everywhere.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot