DB: mandate createdAt insert-timestamp fleet-wide (updatedAt recommended)
Fleet DB rule (Elazar-initiated 2026-07-19, 4-PM converged): MANDATE a row-INSERT timestamp (timestamptz NOT NULL DEFAULT now()) on every table; canonical name createdAt. updatedAt RECOMMENDED (not mandated) where mutation-tracking earns the trigger/app-bump. Two guardrails: (1) supplements not replaces the appEvents+archive audit ledger (when, not who/what-changed); (2) insert-time != domain event date (imports stamp import-time; real dates stay their own field — the reportedPracticeDate lesson). NAME-FLEXIBILITY carve-out (3-PM independent convergence): a table already carrying a semantically-equivalent NOT-NULL insert-time column (archivedAt/capturedAt/detectedAt/deliveredAt/lockedAt/snapshotAt/log ts) SATISFIES the rule — do NOT add a redundant duplicate createdAt; all such equivalents to be DOCUMENTED in evolutiva-db.md for blind-query discoverability. Domain/transactional/junction/lookup tables all carry literal createdAt. Adoption cleanups: pluto systemSettings (add createdAt); venus 15 static catalog tables (add createdAt) + lookupOptions.createdAt NULLABLE->NOT NULL; mars effectively compliant (8 gaps all ops/archive/state w/ purpose-specific ts); enamel greenfield bakes in. Codify to evolutiva-db.md via coder-mars-cc + per-app backfill children. PENDING Elazar approval of name-flexibility carve-out.
Sub-tickets — 1/1 done
Questions
Activity
-
Elazar APPROVED + GO 2026-07-19: name-flexibility carve-out accepted. Codifying to evolutiva-db.md via coder-mars-cc; per-app backfill children to file. Elazar sub-ask: confirm the live practicas + grades tables have createdAt (he saw studentExamScoresArchive + practicasIntegrityInventory in mars's 8-gap list and read them as the practicas/grades tables). Per mars's report those are the archive-mirror (archivedAt + mirrors live createdAt) + an ops-integrity log — live tables have createdAt. Confirming live practicas.createdAt explicitly via db-mars-cc.
-
CODIFIED: coder-mars-cc pushed 32d2773 (evolutiva-db.md new §Insert-Timestamp (createdAt) — Mandatory), all 4 clauses intact. Backfill children: PLUTO-611 filed (systemSettings createdAt) -> db-pluto-cc; venus child pending (15 catalog tables + lookupOptions NOT NULL); mars pending (confirm compliant + live practicas/grades createdAt for Elazar). Elazar re-confirmed approve+go, 'do backfills when possible'.
-
Mars practicas/grades confirm (live information_schema): practicas.createdAt + studentExamScores.createdAt + practicaReviews.createdAt all = timestamptz NOT NULL DEFAULT now(). Elazar's 2 'gap' names were non-domain: studentExamScoresArchive (mirror, archivedAt) + practicasIntegrityInventory (ops log, id+seenAt). Mars VERDICT: compliant, no backfill child. Answered Elazar.
-
PLUTO-611 LANDED: 081d4ce v2.20.17, mig 077, systemSettings.createdAt added NOT NULL DEFAULT now(). Pluto gap closed. EVO-69 remaining: venus backfill child (15 catalog tables + lookupOptions NOT NULL) only. Mars compliant (no child), doc codified 32d2773.