simo
simo

Reputation: 24558

How to check migration status?

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.

Upvotes: 55

Views: 61233

Answers (2)

Ninja Man
Ninja Man

Reputation: 136

If you are using PHP 8 as alternate version then use below command to check.

php80 artisan migrate:status

Check list of PHP Migration command:

php80 artisan list

Upvotes: 0

Bogdan
Bogdan

Reputation: 44526

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

Upvotes: 118

Related Questions