CREATE TABLE IF NOT EXISTS questions (
    id INTEGER PRIMARY KEY,
    text TEXT NOT NULL,
    option1 TEXT,
    option2 TEXT,
    option3 TEXT,
    option4 TEXT,
    correct_index INTEGER NOT NULL,
    requirement TEXT,
    explanation TEXT,
    status INTEGER DEFAULT 0,
    exam_id INTEGER,
    mixed_id INTEGER
);

CREATE INDEX IF NOT EXISTS idx_questions_exam_id ON questions(exam_id);
CREATE INDEX IF NOT EXISTS idx_questions_mixed_id ON questions(mixed_id);
