feat(db): extract holds aggregate to Drizzle (#840) #855
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!855
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "code-lead/840"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pilot Drizzle migration on the smallest aggregate (
holds, 4 fns) — proves the bridge pattern before the load-bearing aggregates land.infrastructure/database/holds.tswithaddHold/removeHold/hasHold/listHoldsrewritten on the Drizzle query builder;HoldRowre-exported under same name.schema/holds.tsmirroring the existing SQL shape (snake_case TS fields, bridge style).db/client.ts::orm()— recompute per call; pinned to the sharedgetDb()handle so there's no second connection.db.ts; callers indomain/workflow/{deps,event-handlers}.tsupdated.Test plan
holds.test.tscovers add/has/remove/list + idempotency + Drizzle ↔ rawgetDb().query(...)round-tripdeps.test.ts(62) still green — applyHoldCommand integration unchangedbun x turbo run typecheck+ Biome check + format cleanCloses #840
holdsaggregate to Drizzle (#840)Pilot Drizzle migration on the smallest aggregate before tackling the load-bearing ones. Adds `schema/holds.ts`, `db/client.ts::orm()` (no memo), and rewrites the four hold-CRUD fns onto the Drizzle query builder pinned to the shared `getDb()` handle. Callers in `domain/workflow/{deps,event-handlers}.ts` now import from `infrastructure/database/holds`.Correct extraction. All 4 ACs met:
holds.ts+schema/holds.ts+db/client.tsadded; callers updated indeps.ts,deps.test.ts,event-handlers.ts; old fns deleted fromdb.ts;orm()recomputes per call. Round-trip test + idempotency covered. CI green (qa, qa-1, db-schema, dockerfile).