New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

erjanmx/laravel-migrate-check

A command to check for pending migrations. Exits with non-zero code if there are any
281,573 54
Install
composer require erjanmx/laravel-migrate-check
Latest Version:v2.4.0
PHP:^7.2||^8.0
Laravel:6 – 10
Older releases:5
License:MIT
Last Updated:Feb 26, 2024
Links: GitHub  ·  Packagist
Maintainer: erjanmx

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.

Related Packages

yadakhov/insert-on-duplicate-key

A trait for MySQL INSERT ON DUPLICATE KEY UPDATE.

3,117,053 275
audunru/eager-load-pivot-relations

Eager load pivot relations for Laravel Eloquent's BelongsToMany relation.

75,555 9
caloskao/migrate-specific

Easily perform database migrations of specific migration files in the Laravel fr...

16,159 7
someonefamous/laravel-findby

Extended 'find' functionality for Eloquent (Laravel).

11,634 3
vluzrmos/eloquent-simple-searchable

An Eloquent Simple Searchable Scope.

201 2

Version History

Version Released PHP Laravel License
v2.4.0 ^7.2||^8.0 ^6|^7|^8|^9|^10.0 MIT
v2.3.0 ^7.2||^8.0 ^6|^7|^8|^9 MIT
v2.2.0 ^7.2||^8.0 ^6|^7|^8 MIT
v2.1.0 ^7.2 ^6|^7|^8 MIT
v2.0.0 ^7.2 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 MIT