Files
evig/docs/README.md
T
g-butandClaude Opus 4.7 0de78dab83 docs+refactor: canonical migration path doc (#7) + Drizzle .check() sweep (#5)
Two of the four follow-ups from the post-team-rebuild backlog.

#7 — docs/MIGRATIONS.md (new):
  Spells out that scripts/db/migrations/ is the canonical path,
  ./drizzle/ is leftover from a retired Drizzle Kit trial and is
  only useful for drizzle-kit studio browsing. Covers naming
  conventions, idempotency rules, the schema_migrations tracking
  table (added in migration 075), local vs Neon application, and
  the most common foot-guns (editing an applied migration, drift
  between Drizzle schema and SQL).
  Linked from docs/README.md under Operations.

#5 — Drizzle .check() declarations mirroring existing migration
constraints. The DB already enforces these (migrations 079 + 080);
adding .check() at the schema level just makes the constraint
visible to developers reading the TypeScript model. Touched only
constraints from migrations the project owns (not the broader
historical schema), so Drizzle Kit's generate flow stays consistent:

  src/db/schema/auth.ts
    + users_token_version_non_negative (mig 079)

  src/db/schema/team.ts
    + team_profiles_work_state_valid (mig 080)
    + compensation_history_at_least_one_amount (mig 080)
    + compensation_history_amounts_non_negative (mig 080)
    + leave_periods_kind_valid (mig 080)
    + leave_periods_dates_ordered (mig 080)
    + payroll_batches_dates_ordered (mig 080)

  src/db/schema/timecards.ts
    + timecards_rate_applied_non_negative (mig 080)

Each name matches the migration's pg_constraint name so a future
drizzle-kit diff sees them as same-name same-shape — no phantom
migration generated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-29 10:50:10 +02:00

3.0 KiB

Documentation

Curated reference for engineers, operators, and contributors. Everything in this folder is meant to stay reasonably current — point-in-time work logs, incident reports, and superseded plans live under archive/.

Getting started

Architecture

Product surfaces

Design

Operations

Mission

Subdirectories

  • api/ — per-route reference
  • components/ — component-level notes
  • development/ — environment + workflow setup
  • features/ — feature briefs
  • guides/ — how-to walkthroughs
  • hirn/ — HIRN AI internals
  • legacy/ — preserved older docs
  • reference/ — long-form reference material
  • archive/ — superseded plans, incident reports, completed-migration logs (preserved for history, not for navigation)