fix migration script

deployment: allow to choose not the latest version, but the previous version, to be able to re-publish a version