I want to migrate:refresh a specific table called scores. I tried this:
php artisan migrate:refresh --path=/database/migrations/scores
but it says nothing to migrate.
You cannot refresh a single migration if its not the last one, but you can step
back in the migrations chain.
Assuming that you have five migrations and your table is at fourth place you can do like this:
php artisan migrate:refresh --step=2
With this command you refresh the last two migrations.
Note that each migration file name contains a timestamp which allows Laravel to determine the order of the migrations.
You can use the --path
argument but it should be a directory in wich the command searches for migrations not a single migration file.
If you run:
php artisan help migrate:refresh
You can see all the parameters accepted.