refactor into separate general platform and migration task