PHPackages                             hedgehog-lab/laravel-mutex-migrations - 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. hedgehog-lab/laravel-mutex-migrations

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

hedgehog-lab/laravel-mutex-migrations
=====================================

Run mutually exclusive migrations from more than one server at a time

v4.0.0(1mo ago)0138↓36.7%MITPHP ^8.2

Since Mar 25Compare

[ Source](https://github.com/hedgehoglab-engineering/laravel-mutex-migrations)[ Packagist](https://packagist.org/packages/hedgehog-lab/laravel-mutex-migrations)[ RSS](/packages/hedgehog-lab-laravel-mutex-migrations/feed)WikiDiscussions Synced 1w ago

READMEChangelog (1)Dependencies (6)Versions (6)Used By (0)

Mutex Migrations for Laravel
============================

[](#mutex-migrations-for-laravel)

Run mutually exclusive migrations from more than one server at a time.

Using Laravel's functionality for [Atomic Locks](https://laravel.com/docs/9.x/cache#atomic-locks), this package extends the built-in `MigrateCommand` class to allow migrations to be run safely when there is the chance that they may be run concurrently against the same database.

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

[](#installation)

Install the package with:

`composer require hedgehog-lab/laravel-mutex-migrations`

Optionally publish the package config file:

`php artisan vendor:publish --tag=mutex-migrations-config`

Usage
-----

[](#usage)

Running a mutex migration using the default `database` store requires the existence of a table to store cache locks. If it does not exist the command will automatically fallback to a standard migration.

`php artisan migrate --mutex`

If two or more migrations happen to run concurrently, the first to acquire a lock will block the next one from running until it has finished, or until the lock times out - after 60 seconds, by default.

Testing
-------

[](#testing)

`./vendor/bin/phpunit`

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance90

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity62

Established project with proven stability

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 ~299 days

Total

5

Last Release

49d ago

Major Versions

1.x-dev → 2.x-dev2024-03-28

2.x-dev → 3.x-dev2025-03-07

3.x-dev → 4.x-dev2026-07-06

PHP version history (2 changes)1.x-devPHP ^8.1

2.x-devPHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/967f8fc19e4b61cc07cd6d69357e2424171236c2f903c23ba6675ceda4f5708e?d=identicon)[will-c-f](/maintainers/will-c-f)

---

Tags

laravelmutexmigrationsnetsellshedgehog-lab

### Embed Badge

![Health badge](/badges/hedgehog-lab-laravel-mutex-migrations/health.svg)

```
[![Health](https://phpackages.com/badges/hedgehog-lab-laravel-mutex-migrations/health.svg)](https://phpackages.com/packages/hedgehog-lab-laravel-mutex-migrations)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M333](/packages/laravel-ai)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k31.8M163](/packages/laravel-cashier)[illuminate/queue

The Illuminate Queue package.

20433.0M1.8k](/packages/illuminate-queue)[spatie/laravel-health

Monitor the health of a Laravel application

88212.7M190](/packages/spatie-laravel-health)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

731189.9k16](/packages/tallstackui-tallstackui)

PHPackages © 2026

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