diff --git a/09 - Audits/Activity Log.md b/09 - Audits/Activity Log.md index 5b8c76b..1f27691 100644 --- a/09 - Audits/Activity Log.md +++ b/09 - Audits/Activity Log.md @@ -810,4 +810,26 @@ prompt; template detail view + search/filter/sort in shop and requests; dark mod --- +### 2026-06-03 — backend v2.8.65–66 — PG seeds, mock shops, template-creation fix + +**Template-creation 500 root cause (agent):** categories table column conflict (Drizzle "order" +vs categoryStore order_num) + random legacy ids per seed → category ids served by the API were +unresolvable by createRequestTemplate. Fixed: categoryStore aligned to canonical "order" column +(with one-time order_num migration), deterministic category legacy ids, hardened categories +fallback (id::text match). Also fixed: the v2.8.64 rating aggregation queried Drizzle reviews +columns but the physical table (written by reviewStore) has different columns — rewritten +against the real columns (seller_user_id). +**New seed:** src/seeds/seedMockShops.ts — Persian categories, 5 sellers + shop settings, +templates with picsum product images, published reviews. npm scripts fixed (paths) + added +seed:levels / seed:templates / seed:mock-shops. +**⚠️ DEV ENV REQUIREMENT:** CATEGORY_STORE=postgres (and ideally REVIEW_STORE / +SHOP_SETTINGS_STORE = postgres) must be set in dev .env.local when REPO_MARKETPLACE=postgres — +docker-compose.dev.yml still defaults these to mongo. Without this, template creation keeps +failing. +**Run on dev after deploy:** docker exec npm run seed:categories && npm run +seed:mock-shops +**Verification:** tsc clean, 14 tests green (3 suites). + +--- +