Cleanup: delete db.ts, lint-ban raw SQL outside DB layer, update docs #849
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
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#867 Unify forge-token secret prefix: FORGEJO_TOKEN_* → FORGE_TOKEN_*
charles/claude-hooks
#841 Migrate
operator_sessions.ts to Drizzle
charles/claude-hooks
#842 Extract + Drizzle
dead_letter_prs + watched_repos aggregates
charles/claude-hooks
#843 Extract + Drizzle
flows aggregate (flows + runs + audit + legacy_forge_calls)
charles/claude-hooks
#844 Extract + Drizzle
agents aggregate (preserve onAgentDelete hook)
charles/claude-hooks
#845 Extract + Drizzle
service_config + label_catalog + agent_type_* aggregates
charles/claude-hooks
#847 Migrate
task-store.ts to Drizzle (separate tasks.db client)
charles/claude-hooks
#848 Migrate
sessions.ts to Drizzle
charles/claude-hooks
Reference
charles/claude-hooks#849
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
As a maintainer, I want the now-empty
db.tsdeleted, raw SQL lint-banned outside an explicit escape hatch, and the architecture docs updated, so that the migration is closed and the new pattern is enforced going forward.Acceptance criteria
Deletion
db.tsreduced to barrel re-exports OR deleted entirely if no shared utilities remain (onlygetDb(),agentsDbPath(),resetDb()survive — relocate todb/client.ts).database/dbupdated to per-aggregate files.Lint
.query(/.run(/.exec(calls outsideinfrastructure/database/and outside files explicitly listed as raw-SQL escape hatches.just qaenforces.Docs
docs/database.md(created in foundation story) updated with final layout: one file per aggregate, schema/ folder, drizzle/ migrations, drift check.CLAUDE.md"Tech stack" section mentions Drizzle.docs/modules.mdtable updated with new file list.Sanity
just qagreen.Out of scope
References
operator_sessions.tsto Drizzlesessions.tsto Drizzletask-store.tsto Drizzle (separatetasks.dbclient)dead_letter_prs+watched_reposaggregatesagentsaggregate (preserveonAgentDeletehook)flowsaggregate (flows + runs + audit + legacy_forge_calls)service_config+label_catalog+agent_type_*aggregates