Fixed #21852 -- Make migration writer serialize iterators
Merge pull request #2198 from Markush2010/ticket21852

Fixed #21852 -- Make migration writer serialize iterators