CREATE TABLE IF NOT EXISTS radio_schedule_runtime (
    radio_id INT NOT NULL PRIMARY KEY,
    active_key VARCHAR(160) NULL,
    active_slot_id INT NULL,
    active_playlist_id INT NULL,
    active_source VARCHAR(40) NULL,
    last_status VARCHAR(40) NULL,
    last_message TEXT NULL,
    last_run_at DATETIME NULL,
    last_switch_at DATETIME NULL,
    timeline_started_at DATETIME NULL,
    created_at DATETIME NOT NULL,
    updated_at DATETIME NOT NULL,
    INDEX idx_active_slot (active_slot_id),
    INDEX idx_active_playlist (active_playlist_id),
    INDEX idx_last_run (last_run_at)
);
