feat(db): Postgres schema, migrations and defects repository (T3)

Drizzle schema for projects, defects, push_subscriptions (C8); generated
migration; a defects repository (createDefect / listRecentDefects); a
programmatic migrator; and a db:verify script. section_id is a plain string
referencing in-code board ids, no FK (ADR 0001). Verified against real
Postgres: migration applies, a defect round-trips, /api/health reports db up.
This commit is contained in:
Julien Calixte
2026-05-27 22:39:32 +02:00
parent 7a4860e111
commit 60ee7b6277
10 changed files with 334 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ review.
- [ ]**Checkpoint:** build + tests pass, board interactive, human review
## Phase 2 — File a defect (G1)
- [ ] **T3** Postgres schema + migrations (C8) (S) — _deps: T1_
- [x] **T3** Postgres schema + migrations (C8) (S) — _deps: T1_
- [ ] **T4** Projects API + ProjectAutocomplete (C4) — F3 (M) — _deps: T3_
- [ ] **T5** File a defect: POST /api/defects + DefectForm (C3) — F2 (M) — _deps: T2, T3, T4_
- [ ]**Checkpoint:** defect files end-to-end (dev auth), tests pass, human review