CREATE TABLE IF NOT EXISTS race_simulations (
    id INT AUTO_INCREMENT PRIMARY KEY,
    race_id INT,
    simulation_run INT,
    horse_id INT,
    finish_position INT,
    final_score DECIMAL(10,4),
    length_behind_winner DECIMAL(6,2),
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;