- Add epoch/attempt tracking to vision_problem_videos schema (epochNumber, attemptNumber, isRetry, isManualRedo) - Update VisionRecorder filename pattern to include epoch/attempt: problem_NNN_eX_aY.mp4 - Fix getRetryContext to use correct slot indices during manual redos - Add answer-submitted marker for redo problems via handleRecordRedo wrapper - Create attempt-tracking.ts utility for video attempt grouping and labeling - Add attempt selector dropdown to ProblemVideoPlayer when multiple attempts exist - Update API routes to accept epoch/attempt query params for video and metadata - Add comprehensive documentation for vision recording system (README.md) Multiple attempts at the same problem (from epoch retry rounds or manual redo clicks) now save separate recordings instead of overwriting each other. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
31 lines
1.2 KiB
SQL
31 lines
1.2 KiB
SQL
-- Custom SQL migration file, put your code below! --
|
|
|
|
-- Vision recordings table for storing abacus camera recordings during practice sessions
|
|
CREATE TABLE `vision_recordings` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`session_id` text NOT NULL REFERENCES `session_plans`(`id`) ON DELETE CASCADE,
|
|
`player_id` text NOT NULL REFERENCES `players`(`id`) ON DELETE CASCADE,
|
|
`filename` text NOT NULL,
|
|
`file_size` integer,
|
|
`duration_ms` integer,
|
|
`frame_count` integer,
|
|
`avg_fps` real,
|
|
`started_at` integer NOT NULL,
|
|
`ended_at` integer,
|
|
`status` text DEFAULT 'recording' NOT NULL,
|
|
`processing_error` text,
|
|
`problem_markers` text,
|
|
`expires_at` integer NOT NULL,
|
|
`created_at` integer NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
|
|
-- Indexes for efficient queries
|
|
CREATE INDEX `vision_recordings_session_id_idx` ON `vision_recordings` (`session_id`);
|
|
--> statement-breakpoint
|
|
CREATE INDEX `vision_recordings_player_id_idx` ON `vision_recordings` (`player_id`);
|
|
--> statement-breakpoint
|
|
CREATE INDEX `vision_recordings_expires_at_idx` ON `vision_recordings` (`expires_at`);
|
|
--> statement-breakpoint
|
|
CREATE INDEX `vision_recordings_status_idx` ON `vision_recordings` (`status`);
|