-- Fix question_options table to allow multiple options per question
-- The "Duplicate entry" error happens when question_id is the only primary key
-- (allowing only 1 option per question). This migration recreates the table
-- with question_options_id as PK so you can have many options per question.

DROP TABLE IF EXISTS question_options;

CREATE TABLE question_options (
    question_options_id INT AUTO_INCREMENT PRIMARY KEY,
    question_id INT NOT NULL,
    _options VARCHAR(500) NOT NULL,
    FOREIGN KEY (question_id) REFERENCES questions(question_id) ON DELETE CASCADE
);
