The former Padres ace is defecting to San Francisco.