pub fn ensure_from_older_version(
    storage: &mut dyn Storage,
    name: &str,
    new_version: &str
) -> StdResult<Version>
Expand description

This function not only validates that the right contract and version can be migrated, but also updates the contract version from the original (stored) version to the new version. It returns the original version for the convenience of doing external checks.