rearrange MigrationTask and migration template