feat(db): migrate operator_sessions to Drizzle (#841) #856

Merged
reviewer merged 1 commit from code-lead/841 into main 2026-05-04 21:57:49 +00:00
Collaborator

Closes #841

Pull operator-session CRUD off the hand-rolled SQL string layer onto the Drizzle query builder, following the holds pilot.

Test plan

  • bun test src/infrastructure/database/operator-sessions.test.ts (18 pass)
  • bun x turbo run test whole-workspace (3108 pass)
  • just qa clean — typecheck + Biome lint + format
Closes #841 Pull operator-session CRUD off the hand-rolled SQL string layer onto the Drizzle query builder, following the holds pilot. ## Test plan - [x] `bun test src/infrastructure/database/operator-sessions.test.ts` (18 pass) - [x] `bun x turbo run test` whole-workspace (3108 pass) - [x] `just qa` clean — typecheck + Biome lint + format
feat(db): migrate operator_sessions to Drizzle (#841)
All checks were successful
qa / dockerfile (pull_request) Successful in 15s
qa / db-schema (pull_request) Successful in 35s
qa / qa-1 (pull_request) Successful in 1m16s
qa / qa (pull_request) Successful in 0s
c543064331
Pull operator-session CRUD off the hand-rolled SQL string layer onto the
Drizzle query builder, following the holds pilot. Adds the per-aggregate
schema file under schema/ and switches every CRUD path (create, get,
touch, delete, sweep, list) to orm() against operatorSessions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
reviewer approved these changes 2026-05-04 21:57:40 +00:00
reviewer left a comment

All 6 functions correctly migrated to Drizzle; CI green, 18 tests pass, no raw SQL remains. Nit: AC called for typeof operatorSessions.$inferSelect but manual interface is kept — actually preferable here since it narrows forge_type to SessionForgeType; consistent with the holds pilot.

All 6 functions correctly migrated to Drizzle; CI green, 18 tests pass, no raw SQL remains. Nit: AC called for `typeof operatorSessions.$inferSelect` but manual interface is kept — actually preferable here since it narrows `forge_type` to `SessionForgeType`; consistent with the holds pilot.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!856
No description provided.