Skip to content

Fix/composite indexes 258#386

Merged
kilodesodiq-arch merged 2 commits into
ChainForgee:mainfrom
kimanicode:fix/composite-indexes-258
Jul 19, 2026
Merged

Fix/composite indexes 258#386
kilodesodiq-arch merged 2 commits into
ChainForgee:mainfrom
kimanicode:fix/composite-indexes-258

Conversation

@kimanicode

Copy link
Copy Markdown
Contributor

Summary

Adds dashboard-focused composite indexes so filtered campaign and aid package queries can use ordered composite access paths.

  • Fixes Claim @@index([campaignId, status]) indentation
  • Adds Campaign @@index([orgId, status, createdAt])
  • Adds AidPackage @@index([campaignId, status, createdAt])
  • Adds a Prisma migration for the new indexes
  • Documents the intended dashboard query shapes in docs/db/indexes.md

Testing

DATABASE_URL="file:./dev.db" npx prisma validate --schema prisma/schema.prisma
npm run build
EXPLAIN ANALYZE was not run locally because this repo is currently configured for SQLite, while that acceptance check requires PostgreSQL.

### Screenshots
N/A

### Checklist
- [x] Tests added or updated for new/changed behavior
- [x] Existing tests pass
- [x] No secrets, keys, or seed phrases committed
- [x] Follows the coding conventions in the relevant service README
- [x] PR is focused on a single concern

@kilodesodiq-arch kilodesodiq-arch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kilodesodiq-arch
kilodesodiq-arch merged commit dcbd3d8 into ChainForgee:main Jul 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants