How to change the order that Laravel migrations happen?

October 26, 2018

If your Laravel migration files are running in the incorrect order when you call php artisan migrate, then it is quite easy to get them in the desired order.

Rename the migration file, as it is sorted alphabetically

For example if you change database/migrations/2014_10_12_000000_create_users_table.php to something like

database/migrations/2018_10_11_000000_create_users_table.php then it will be the most recent one processed when doing php artisan migrate.