34760-vm/db/migrations/003_create_survey_questions_table.sql
Flatlogic Bot a29976994c v2
2025-10-07 16:34:00 +00:00

9 lines
355 B
SQL

CREATE TABLE IF NOT EXISTS survey_questions (
id INT AUTO_INCREMENT PRIMARY KEY,
survey_id INT NOT NULL,
question_text TEXT NOT NULL,
question_type VARCHAR(50) NOT NULL, -- e.g., 'text', 'multiple-choice', 'rating'
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (survey_id) REFERENCES surveys(id) ON DELETE CASCADE
);