Fix migration scripts