checkVersionAndMigrate