fix: backfill recommendation evidence for existing recommendations
Migration 028: For each recommendation with no evidence rows, finds the closest matching trend_window (by ticker + time_horizon + timestamp) and re-inserts evidence from top_supporting/opposing_evidence arrays. Filters out non-UUID pattern IDs and verifies documents exist. This fixes 'No evidence linked' on recommendations created before the UUID filtering fix in persist_recommendation.
This commit is contained in:
@@ -76,7 +76,7 @@ When a full reset is needed:
|
||||
## Database Migrations
|
||||
- Located in `infra/migrations/001_*.sql` through `027_*.sql`
|
||||
- Applied automatically by `runmefirst.sh` in sorted order
|
||||
- Next migration number: **028**
|
||||
- Next migration number: **029**
|
||||
- Key migrations:
|
||||
- 016: Global news interpolation (global_events, macro_impact_records, exposure_profiles, trend_projections)
|
||||
- 017: Competitive intelligence (competitor_relationships, competitive_signal_records)
|
||||
|
||||
Reference in New Issue
Block a user