Skip to content

ADR-0021: Hard delete of registers by default

  • Status: Superseded by ADR-0011
  • Date: 2026-11-12

The initial data rules had to say what “delete” means for the registers of the product: people, vehicles, customers, jobs, candidates and the others. Compliance documents were already known to be under retention rules.

What happens to a row when a user deletes a register?

  • The record of this decision states the rule without listing its reasons.
  • The rule itself shows the one driver: logical deletion only where a retention rule demands it.
  1. Hard delete by default, with logical deletion only where a retention rule requires it (compliance documents).
  2. Logical deletion for every register.

Chosen option at the time: 1.

It did not last the day. When the common pattern of every register was defined (list, form, detail page, audit row on each write), it specified “archive and reactivate” in place of delete. The rule was rewritten as ADR-0011 before the first register was built, so every register has archiving from the start.

Of the rule as it was written:

  • Good, because lists and unique rules would not have to deal with removed rows.
  • Bad, because deleting a register would either fail on its references or remove history with it.
  • Bad, because a deletion by mistake could not be undone by the user.

What remains of it: the access control tables created under this rule (custom roles, memberships and sessions) keep real deletion, and so do form lines inside another register, such as the contacts of a customer, with the values recorded in the audit log.