preserve the version when getting the last migration. closes #1553