LaravelPackages.net
Acme Inc.
Toggle sidebar
erjanmx/laravel-migrate-check

A command to check for pending migrations. Exits with non-zero code if there are any

276.080
54
v2.4.0
About erjanmx/laravel-migrate-check

erjanmx/laravel-migrate-check is a Laravel package for a command to check for pending migrations. exits with non-zero code if there are any. It currently has 54 GitHub stars and 276.080 downloads on Packagist (latest version v2.4.0). Install it with composer require erjanmx/laravel-migrate-check. Discover more Laravel packages by erjanmx or browse all Laravel packages to compare alternatives.

Last updated

An artisan command to check for pending migrations. Exits with non-zero code if there any.

Build Status

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 non-zero code if there are any migrations to run.

Requirements

This command supports all database drivers that Laravel does.

Installation

You can install the package via composer:

composer require erjanmx/laravel-migrate-check

Thanks to Laravel 5.5 package auto-discovery the migrate:check command will be registered

Usage

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

ezgif com-gif-maker

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

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

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.

Star History Chart