PHPackages                             erjanmx/laravel-migrate-check - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. erjanmx/laravel-migrate-check

ActiveLibrary[Database &amp; ORM](/categories/database)

erjanmx/laravel-migrate-check
=============================

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

v2.4.0(3y ago)54273.8k↓36.7%11[1 PRs](https://github.com/erjanmx/laravel-migrate-check/pulls)1MITPHPPHP ^7.2||^8.0

Since Dec 20Pushed 2y ago2 watchersCompare

[ Source](https://github.com/erjanmx/laravel-migrate-check)[ Packagist](https://packagist.org/packages/erjanmx/laravel-migrate-check)[ Docs](https://github.com/erjanmx/laravel-migrate-check)[ RSS](/packages/erjanmx-laravel-migrate-check/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (14)Used By (1)

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

[](#an-artisan-command-to-check-for-pending-migrations-exits-with-non-zero-code-if-there-any)

[![Build Status](https://camo.githubusercontent.com/c173aff85b125c8e3ab7eb38c07065bf76f18465217d5559d254f59ff3d910fd/68747470733a2f2f6170702e7472617669732d63692e636f6d2f65726a616e6d782f6c61726176656c2d6d6967726174652d636865636b2e7376673f6272616e63683d6d6173746572)](https://app.travis-ci.com/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 non-zero code if there are any migrations to run.

Requirements
------------

[](#requirements)

This command supports all database drivers that Laravel does.

Installation
------------

[](#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
-----

[](#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](https://user-images.githubusercontent.com/4899432/34324977-691c5ca2-e895-11e7-9564-f4313763bc74.gif)](https://user-images.githubusercontent.com/4899432/34324977-691c5ca2-e895-11e7-9564-f4313763bc74.gif)

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#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
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 77.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~194 days

Recently: every ~269 days

Total

11

Last Release

1126d ago

Major Versions

v1.3.0 → v2.0.02020-05-07

PHP version history (3 changes)v1.0.0PHP ^7.0

v2.0.0PHP ^7.2

v2.2.0PHP ^7.2||^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/958d351ea9e6d267aac678f831e133b90242536c735fb5764a04c6bc4a18fc17?d=identicon)[erjanmx](/maintainers/erjanmx)

---

Top Contributors

[![erjanmx](https://avatars.githubusercontent.com/u/4899432?v=4)](https://github.com/erjanmx "erjanmx (24 commits)")[![erjanmx-onlinesup](https://avatars.githubusercontent.com/u/22002562?v=4)](https://github.com/erjanmx-onlinesup "erjanmx-onlinesup (2 commits)")[![priithansen](https://avatars.githubusercontent.com/u/1476082?v=4)](https://github.com/priithansen "priithansen (2 commits)")[![deevus](https://avatars.githubusercontent.com/u/856194?v=4)](https://github.com/deevus "deevus (1 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (1 commits)")[![spawnia](https://avatars.githubusercontent.com/u/12158000?v=4)](https://github.com/spawnia "spawnia (1 commits)")

---

Tags

artisanartisan-commandautodeploydatabaselaravellaravel-migrationlaravel-packagemigrationpending-migrationscheckdatabaseeloquentmigratelaravel-migrate-check

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/erjanmx-laravel-migrate-check/health.svg)

```
[![Health](https://phpackages.com/badges/erjanmx-laravel-migrate-check/health.svg)](https://phpackages.com/packages/erjanmx-laravel-migrate-check)
```

###  Alternatives

[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.8M191](/packages/spatie-laravel-backup)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
