n How to change migration order in Laravel 7 | CodimTh

Please Disable Your Browser Adblock Extension for our site and Refresh This Page!

our ads are user friendly, we do not serve popup ads. We serve responsible ads!

Refresh Page
Skip to main content
On . By CodimTh


Is there a way how I can change the migrations order without remaking them all?


If you want to change the order of DB migrations, just rename the file's timestamp, like:

from 2020_08_04_070443_create_products_table.php to 2020_07_04_070443_create_products_table.php (changed from 2020_08_04 to 2020_07_04).

Then run the migrations again.

Riadh Rahmi

Senior Web Developer PHP/Drupal & Laravel

I am a senior web developer, I have experience in planning and developing large scale dynamic web solutions especially in Drupal & Laravel.

Web Posts


Page Facebook