Minor improvements to migration scripts