PHPackages                             techsemicolon/laravel-migration-pipeline - 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. techsemicolon/laravel-migration-pipeline

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

techsemicolon/laravel-migration-pipeline
========================================

A migration pipeline to make sure same migration is not run again in multiple server setup

1.0.0(7y ago)08MITPHPPHP &gt;=5.3.0

Since Apr 9Pushed 7y agoCompare

[ Source](https://github.com/techsemicolon/laravel-migration-pipeline)[ Packagist](https://packagist.org/packages/techsemicolon/laravel-migration-pipeline)[ RSS](/packages/techsemicolon-laravel-migration-pipeline/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel Migration Pipeline
==========================

[](#laravel-migration-pipeline)

A migration pipeline to make sure same migration is not run again in multiple server setup

Version Support :
-----------------

[](#version-support-)

Works for Laravel version 5.3 and above.

Introduction :
--------------

[](#introduction-)

When you run `php artisan migrate` in laravel, it checks if there are any new migration files which are not yet migrated. If yes, then it runs each migration one by one and adds an entry into `migrations` table with migration name and batch number.

However, when you have multiple servers on autoscalling and have the CICD pipelines to automatically pull the latest releases of git webhooks, the post webhook script having `php artisan migrate` runs almost simultaneously on all those servers.

For example lets say, you have 3 laravel servers running. When you push latest releases to git, git webhook triggers the CICD pipeline and then all servers receive the webhooks almost at the same time.

All these 3 servers will run webhook scripts, which will have git pull and then php artisan commands. One of which will be `php artisan migrate`. If you have 3 new migrations in the release, all these 3 will be attempted to run with different(mostly consecutive) batch numbers.

We want to avoid that. If a migration is already run on the 1st server out of 3, we do not want 2nd and 3rd server to re-run it. This is when this package comes into picture.

In any given situation, if a migration is running on one server or already run ina different batch number, it will not run again. This will avoid the above problem.

Installation :
--------------

[](#installation-)

To install the package using composer :

```
composer require techsemicolon/gitdeployer
```

Once installed, you can add service provider in `config/app.php` file for laravel version &lt;= 5.4. For later versions the service provider will be automatically included.

```
Techsemicolon\MigrationPipeline\ServiceProvider::class,
```

Example :
---------

[](#example-)

Following screenshot gives you an idea where both the servers are running `php artisan migrate` at the same time. However, the right server ran migration\_1 hence, left server skipped that and ran the remaining ones.

Also, once the migration\_1 was ran by right server, migration\_2, migration\_3 and migration\_4 were skipped because those were already run by the left server.

 [![Laravel Migration Pipeline](images/Example.png)](images/Example.png)

Note :
------

[](#note-)

This package assumes/requires that you give unique names to your migrations. By default each migration in laravel is unique if you use `php artisan make:migration some_table_migration` where laravel adds timestamp at the start of migration file name. But in case you are removing that timestamp, make sure you have something in the migration file name which marks it as unique.

License :
---------

[](#license-)

This package is open-sourced software licensed under the MIT license

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2591d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31728773?v=4)[Mihir Bhende](/maintainers/techsemicolon)[@techsemicolon](https://github.com/techsemicolon)

---

Top Contributors

[![techsemicolon](https://avatars.githubusercontent.com/u/31728773?v=4)](https://github.com/techsemicolon "techsemicolon (9 commits)")

### Embed Badge

![Health badge](/badges/techsemicolon-laravel-migration-pipeline/health.svg)

```
[![Health](https://phpackages.com/badges/techsemicolon-laravel-migration-pipeline/health.svg)](https://phpackages.com/packages/techsemicolon-laravel-migration-pipeline)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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