CREATE TABLE survey_imports (
    id INT AUTO_INCREMENT PRIMARY KEY,
    settlement_id INT NOT NULL,
    original_filename VARCHAR(255) NOT NULL,
    row_count INT NOT NULL DEFAULT 0,
    question_count INT NOT NULL DEFAULT 0,
    parsed_data LONGTEXT NOT NULL COMMENT 'JSON: kérdések és válaszok strukturált formátumban',
    imported_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    INDEX idx_survey_imports_settlement (settlement_id),
    CONSTRAINT fk_survey_imports_settlement FOREIGN KEY (settlement_id) REFERENCES settlements(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
