fix(db): add $defaultFn(nowIso) to upstreamDriftReports.updatedAt#8404
Conversation
…ONbored#8369) Match the schema house rule every sibling updatedAt already follows so an insert that omits the column gets a real ISO-8601 timestamp. Existing writers keep their explicit updatedAt writes; this is only the schema-level safety net. Regression covers the omit path in schema-timestamp-defaults.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8404 +/- ##
==========================================
- Coverage 92.42% 89.45% -2.97%
==========================================
Files 791 98 -693
Lines 79250 22892 -56358
Branches 23946 3872 -20074
==========================================
- Hits 73243 20477 -52766
+ Misses 4868 2237 -2631
+ Partials 1139 178 -961
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-24 12:04:52 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
What
upstreamDriftReports.updatedAtwas the onlyupdatedAtinsrc/db/schema.tsmissing.$defaultFn(() => nowIso()), despite the file header's house rule (and ~30 sibling columns that already follow it). Current writers always passupdatedAtexplicitly, so nothing breaks today — but any future insert that omits the column would hit the same client-side corruption class the header documents.Changes
.$defaultFn(() => nowIso())toupstreamDriftReports.updatedAtonly —generatedAtand repository writers left untouched.test/unit/schema-timestamp-defaults.test.ts: drizzle insert that omitsupdatedAtgets a real ISO-8601 timestamp (notCURRENT_TIMESTAMP/ empty).Closes
Closes #8369
Verification
npx vitest run test/unit/schema-timestamp-defaults.test.ts— 7 passed (including the new omit-path case)