TESB-14577 Create migration task (refactor)