Modifying migration script to work on remote server