Why
Follow-up of #48 (review of #58): the request list pages by (created_at desc, id desc) per company, but there is no matching index, so every page sorts all of the company's requests before LIMIT 51. Approved by the orchestrator on 2026-09-24.
Scope
- Migration: index on
app.requests (company_id, created_at desc, id desc).
- Schema + snapshot via the generator;
data-model.md.
Acceptance criteria
- The planner uses the index for a page query of one company (checked with
EXPLAIN in an integration test on a seeded table, or the catalogue proves the index exists with the right column order).
pnpm verify green.
Why
Follow-up of #48 (review of #58): the request list pages by
(created_at desc, id desc)per company, but there is no matching index, so every page sorts all of the company's requests beforeLIMIT 51. Approved by the orchestrator on 2026-09-24.Scope
app.requests (company_id, created_at desc, id desc).data-model.md.Acceptance criteria
EXPLAINin an integration test on a seeded table, or the catalogue proves the index exists with the right column order).pnpm verifygreen.