[gh-469] Move migration code to its own module

Assignee Loading
Time tracking Loading