Implement complete daily practice session system with: **Practice Components:** - StudentSelector: Select which student is practicing - ProgressDashboard: Show student's current level and progress - PlanReview: Review and approve generated session plan - ActiveSession: Main practice UI with three-part structure - SessionSummary: Show results after session completion - NumericKeypad: Touch-friendly number input for mobile - VerticalProblem: Columnar problem display **Session Structure:** - Part 1 (Abacus): Physical abacus practice, vertical format - Part 2 (Visualization): Mental math visualizing beads - Part 3 (Linear): Mental math with sentence format **Infrastructure:** - Database schemas for curriculum, skills, sessions - Session planner with skill-based problem generation - React Query hooks for session management - Consolidated device capability detection hooks - API routes for curriculum and session management **Problem Generation:** - ActiveSession now uses actual skill-based algorithm - Problems generated with appropriate skills constraints - Storybook stories use real problem generation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
1.0 KiB
SQL
25 lines
1.0 KiB
SQL
-- Custom SQL migration file, put your code below! --
|
|
|
|
-- Create practice_sessions table for tracking practice activity history
|
|
CREATE TABLE `practice_sessions` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`player_id` text NOT NULL,
|
|
`phase_id` text NOT NULL,
|
|
`problems_attempted` integer DEFAULT 0 NOT NULL,
|
|
`problems_correct` integer DEFAULT 0 NOT NULL,
|
|
`average_time_ms` integer,
|
|
`total_time_ms` integer,
|
|
`skills_used` text DEFAULT '[]' NOT NULL,
|
|
`visualization_mode` integer DEFAULT 0 NOT NULL,
|
|
`started_at` integer NOT NULL,
|
|
`completed_at` integer,
|
|
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON UPDATE no action ON DELETE cascade
|
|
);
|
|
--> statement-breakpoint
|
|
|
|
-- Create indexes for practice_sessions
|
|
CREATE INDEX `practice_sessions_player_id_idx` ON `practice_sessions` (`player_id`);
|
|
--> statement-breakpoint
|
|
CREATE INDEX `practice_sessions_started_at_idx` ON `practice_sessions` (`started_at`);
|
|
--> statement-breakpoint
|
|
CREATE INDEX `practice_sessions_player_phase_idx` ON `practice_sessions` (`player_id`, `phase_id`); |