-- Migration 005: Add answered_count to exam_attempts
-- Enables backend timer enforcement and auto-submit grading.
-- Idempotent — safe to run multiple times.

ALTER TABLE exam_attempts
    ADD COLUMN IF NOT EXISTS answered_count INT UNSIGNED NOT NULL DEFAULT 0
    AFTER total_questions;
