with pnpm db:generate — do not hand-edit SQL. claim_task before work.
---
# Task summary
Add `model_providers` and `role_model_routes` tables with workspace scoping and indexes per the ADR.
## Description
### Schema (`packages/database/src/schema/`)
-`model_providers.ts` — columns from ADR; unique `(workspace_id, alias)`
-`role_model_routes.ts` — FK to `model_providers`; unique `(workspace_id, role_id)`
- Re-export from `schema/index.ts`; add relations if needed
### Migration
-`pnpm db:generate` from repo root after schema edit
- Commit generated SQL under `packages/database/migrations/`
### Optional seed helper
-`seedDefaultRoleRoutes(workspaceId)` in database package or web server — inserts pipeline default role_ids pointing at aliases **only if** matching aliases exist (no auto-create of providers)