updated the script to run migrations in a common way