Apdated migrate.php file with some functions