Various changes to migration scripts