The Task 3 schema drifted from what better-auth@1.6.18's CLI generates: it used
mode:'timestamp' (epoch seconds) instead of 'timestamp_ms', left verification
timestamps nullable, and omitted the default expressions and helper indexes.
Regenerated src/db/schema.ts from `@better-auth/cli generate` (authoritative per
the plan's version-drift rule) and rebuilt migration 0000 from scratch (no data
exists yet). Converted the index callbacks from the CLI's array form to the
object form required by drizzle-orm@0.36.4's types. Adds session_userId_idx,
account_userId_idx, verification_identifier_idx and the unixepoch defaults.
Tests (health, db, auth sign-up/sign-in, /api/me round-trip) all pass; typecheck
clean; db:generate reports no pending changes.
No migration shipped in the export. Recreates production_tasks and
time_logs (columns derived from the API queries) so the backend can run
against a fresh self-hosted Postgres.
- .gitignore: the bare 'logs' rule was matching the api/logs/ source
dir, so the route was never committed. Anchor it to /logs/ and repair
two log globs where '*' had been mangled to '_'.
- route.ts: add the missing 'import sql' — the file used sql but never
imported it, so every GET/POST /api/logs threw ReferenceError and 500'd.
Insole-production time tracker exported from the Create/Anything AI
platform. Baseline snapshot before any reverse-engineering or cleanup.
- apps/mobile: Expo Router app (iOS/Android/web), the only workspace
- publisher/: standalone OpenNext/AWS deploy tooling for the web side
- Backend (/api/tasks, /api/logs + DB) lives remotely, not in this repo