Upgrading by the application code