etsetra / laravel-migration-shield
Protects production environments by preventing the execution of dangerous migration and seeding commands like migrate:fresh, migrate:refresh, migrate:rollback, db:seed, and db:wipe.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/etsetra/laravel-migration-shield
Requires
- illuminate/support: ^12.0
- laravel/framework: ^12.0
Requires (Dev)
- phpunit/phpunit: ^10.0
This package is not auto-updated.
Last update: 2025-12-08 22:02:27 UTC
README
Laravel Migration Shield is a Laravel package that protects data integrity in production environments by preventing the execution of dangerous migration and seeding commands.
Features
- Prevents the execution of commands like
migrate:fresh,migrate:refresh,migrate:rollback,migrate:reset,migrate:status,db:seed, anddb:wipein production environments. - Simple and easy installation.
- Compatible with Laravel 12.
Installation
Install the package via Composer:
composer require etsetra/laravel-migration-shield
Laravel will automatically register the service provider.
Usage
Once installed, Laravel Migration Shield works silently
Testing
To run the tests, use the following command:
./vendor/bin/phpunit --filter MigrationShieldTest
Contributing
If you wish to contribute, please submit a pull request.
License
MIT