Replace setVersion with upgradeneeded