-- Migration: Add activity_data column to lesson_progress
-- This allows lessons to store custom state (e.g., SQL injection discoveries, XSS attempts, etc.)

ALTER TABLE lesson_progress
ADD COLUMN activity_data JSONB DEFAULT '{}'::jsonb;

COMMENT ON COLUMN lesson_progress.activity_data IS 'Custom lesson-specific state data (e.g., discoveries, attempts, etc.)';

-- Create index for faster JSONB queries
CREATE INDEX idx_lesson_progress_activity_data ON lesson_progress USING gin(activity_data);
