netsells / laravel-migration-loadbalancer
Installs: 22
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/netsells/laravel-migration-loadbalancer
Requires
- php: ^7.3
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2025-09-14 19:08:23 UTC
README
Provides middleware that returns a 503 should there be any migrations that need migrating. This is to be used with a loadbalancer so that only the correct codebase is live when the database migrates.
See https://engineering.instawork.com/elegant-database-migrations-on-ecs-74f3487da99f
Installation
You can install the package via composer:
composer require netsells/laravel-migration-loadbalanceer
Usage
Laravel will auto-load the service provider. All you need to do is add the global middleware to the top of your stack in app/Http/Kernel.php
.
protected $middleware = [ \Netsells\MigrationLb\HandleMigrationLbMiddleware::class, // Other middleware ];
Security
If you discover any security related issues, please email sam@netsells.co.uk instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.