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.
1.0
2025-03-30 20:23 UTC
Requires
- illuminate/support: ^12.0
- laravel/framework: ^12.0
Requires (Dev)
- phpunit/phpunit: ^10.0
This package is not auto-updated.
Last update: 2025-06-09 19:41:44 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:wipe
in 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