{
  "id": 20523966,
  "title": "Day 25: The Audit Trail and the Before and After Values of a Change",
  "url": "https://urgent.news/2026/11/18/day-25-the-audit-trail-and-the-before-and-after-values-of-a-change",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-18T01:00:09.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/jeff377/day-25-the-audit-trail-and-the-before-and-after-values-of-a-change-1j5k"
  },
  "original_language": "en",
  "account": "During the course of an audit, determining who made changes to a particular record is often a matter of looking back months later. The person inquiring will lack the initial screen appearance, build version, or specific details about the modification. Consequently, every logging aspect must account for this initial scenario, including those involving minimal actions akin to merely conserving storage space.\n\nThe article discusses three tables in the audit database that share common columns. The sole objective of these tables is to record three distinct questions. Each question corresponds to one table: where an event occurs, who initiated the action, and the outcome of the event.\n\nThe shared columns in all three tables include user ID, user name, company ID, company name, API key ID, API key name, and a trace ID. These columns are not normalized, meaning they are intentionally stored in a non-standardized format. This design decision allows for the preservation of historical information, such as a user's previous name or a company's former letterhead, even if those values differ from the current entries in the user or company tables.\n\nWithin the shared columns, the user ID serves as the primary identifier and can be directly linked to an audit row. However, sensitive information like passwords or API keys must remain protected. Therefore, the framework does not store such data in plain text, ensuring that only the user ID is recorded in the audit logs.",
  "summary": "By the time someone asks who changed the amount on this record last month, it is usually months later. Whoever is asking has neither the screen as it looked then nor the build that was running, only the few rows left behind at the time. Who logged in, who changed which field from what to what, who looked at which record: every decision in the auditing layer has to assume that scene first,…",
  "key_points": [
    "Three tables in audit database record event details",
    "Shared columns include user ID, user name, company ID",
    "User ID links to audit row, sensitive data remains protected"
  ],
  "editors_take": "Intentionally non-normalized audit tables prioritize the preservation of historical context over database efficiency, ensuring that investigators can reconstruct exact user and company identities as they existed at the moment of change.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}