add perform_upgrade