feat(matching-runs): add per-run aggregate stats and UI display
- Admin list endpoint returns totalSuggestions, assignedCount, aggregatedNotFoundCount per run - UI: show Total/Matched/Not found columns using fresh aggregates - Add anchor link Run #ID and wording 'Pairs created in this run'
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
-- Add origin_run_id column to recording_suggestions
|
||||
ALTER TABLE "recording_suggestions" ADD COLUMN "origin_run_id" INTEGER;
|
||||
|
||||
-- Add foreign key to matching_runs
|
||||
ALTER TABLE "recording_suggestions"
|
||||
ADD CONSTRAINT "recording_suggestions_origin_run_id_fkey"
|
||||
FOREIGN KEY ("origin_run_id") REFERENCES "matching_runs"("id")
|
||||
ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- Simple index to support joins by origin_run_id
|
||||
CREATE INDEX IF NOT EXISTS "recording_suggestions_origin_run_id_idx"
|
||||
ON "recording_suggestions"("origin_run_id");
|
||||
|
||||
Reference in New Issue
Block a user