Home » Php » How to check migration status?

How to check migration status?

Posted by: admin October 29, 2017 Leave a comment

Questions:

In Rails, I can run:

rake db:migrate:status

But how about Laravel? How would I know which migrations will run when I do:

php artisan migrate

I am on a production server, and I need to make sure that I won’t break things.

Answers:

It’s the exact same way with artisan, just add :status:

php artisan migrate:status

In the future you can run just php artisan and it will list all available commands with a short description for each one. If you want more details about a command, like usage and what options it accepts, you can run php artisan help [command]. So for your command it would be:

php artisan help migrate:status