docs: sync from backend f5e53cb — M24 DISTINCT ON, M30 blog indexes, M39 notification enums

This commit is contained in:
Siavash Sameni
2026-06-07 07:19:32 +04:00
parent 0bb60dbc98
commit a49d6ebfc4
2 changed files with 13 additions and 3 deletions

View File

@@ -12,6 +12,16 @@ entries on top. Maintained by agents per the rule in `../AGENTS.md`.
---
### 2026-06-07 — backend@f5e53cb — DB audit medium batch M24/M30/M39
**Commits:** `f5e53cb`
**Touched:** backend `src/db/repositories/drizzle/DrizzlePaymentRepo.ts`, `src/db/schema/blogPost.ts`, `src/db/schema/notification.ts`, `src/db/migrations/0021_needy_carlie_cooper.sql`, `package.json`, `package-lock.json`; docs `09 - Audits/DB Query & Schema Audit - 2026-06-06.md`, `09 - Audits/Activity Log.md`
**Why:** Close Medium M24 by replacing in-memory deduplication with Postgres DISTINCT ON for payment latest-per-request lookups. Close Medium M30 by adding GIN index on blog_posts.tags and converting status to pgEnum. Close Medium M39 by converting notifications.type and notifications.category to pgEnum for DB-level type safety.
**Verification:** backend `npm run typecheck` (clean), `npm test -- --runTestsByPath __tests__/db-audit-critical-fks.test.ts __tests__/drizzle-marketplace-repo-batch.test.ts --runInBand` (2 suites / 8 tests passed). Pushed to Forgejo.
**Linked docs updated:** [[09 - Audits/DB Query & Schema Audit - 2026-06-06]]
---
### 2026-06-07 — backend@8fc2309 — DB audit M43/M44 missing FKs + H37 dispute enums
**Commits:** `8fc2309`