1
0

006_users_tombstoned.sql 617 B

12345678910111213
  1. -- R01-N23: tombstone column for users.
  2. --
  3. -- An admin marks a user as a "former user" when their name/email should no
  4. -- longer be displayed in the live UI (privacy / GDPR-style erasure).
  5. -- The audit log's `user_email` column still keeps the historical value
  6. -- verbatim — erasure laws permit retention for legal / security purposes —
  7. -- so the trail does not break.
  8. --
  9. -- Nullable; NULL ⇒ active user. Stamped with a UTC ISO-8601 string when
  10. -- tombstoned. A subsequent successful OIDC sign-in or an admin "restore"
  11. -- action clears the column back to NULL.
  12. ALTER TABLE users ADD COLUMN tombstoned_at TEXT;