How to run a specific migration in Laravel

Categorized as Laravel Tagged

Sometimes you need to run only one specific database migration in Laravel. You can do it with the following command:

php artisan migrate  --path=/database/migrations/your_migrations_file.php

Don’t run php artisan migrate:refresh if you already have tables and table data, otherwise you will lose it.

Leave a reply

Your email address will not be published.