36352-vm/db/migrations/006_create_exam_questions_table.sql
Flatlogic Bot 93f530e4f6 t7
2025-12-07 19:58:10 +00:00

9 lines
344 B
SQL

CREATE TABLE IF NOT EXISTS exam_questions (
id INT AUTO_INCREMENT PRIMARY KEY,
exam_id INT NOT NULL,
question_text TEXT NOT NULL,
question_type ENUM('multiple_choice', 'free_text') NOT NULL,
options JSON,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (exam_id) REFERENCES exams(id) ON DELETE CASCADE
);