A command to check for pending migrations. Exits with number of pending migrations if there are any
caherrera/laravel-migrate-check is a Laravel package for a command to check for pending migrations. exits with number of pending migrations if there are any.
It currently has 0 GitHub stars and 34 downloads on Packagist (latest version v1.2.2).
Install it with composer require caherrera/laravel-migrate-check.
Discover more Laravel packages by caherrera
or browse all Laravel packages to compare alternatives.
Last updated
This is a fork from erjanmx/laravel-migrate-check
Laravel has a migrate:status command to check status of migrations. But this command mostly for humans. There are situations where one needs to know whether to run migrations when using autodeployment, maybe with switching to maintenance mode.
This package contains a migrate:check command that exits with number of pending migrations if there are any migrations to run.
This command supports all database drivers that Laravel does.
You can install the package via composer:
composer require caherrera/laravel-migrate-check
Thanks to Laravel 5.5 package auto-discovery the migrate:check command will be registered
php artisan migrate:сheck
You can specify database and path to migration file via options just like they are used in php artisan migrate command

Please see CHANGELOG for more information what has changed recently.
In order for the test to be run you should set up an empty mysql database laravel_migrate_check . The username should be root, the required password should be empty.
$ composer test
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.