The ONE thing Laravel is desperately missing that EVERY developer needs! Automatic database schema change tracking, safety analysis, and instant rollback system for Laravel migrations.
Installation • Quick Start • Features • Commands • Use Cases • Contributing
⚠️ Production Safety Tool: Whizbang is designed to protect live databases. Use it in development and production to prevent irreversible data loss.
- You run
php artisan migratein production. - Migration drops a column with important data → GONE FOREVER.
- App breaks → NO EASY WAY BACK.
- Boss asks "What changed?" → ¯\(ツ)/¯
Laravel migrations are one-way by default. Once destructive changes happen, there’s no built-in recovery or audit trail.
An automatic safety net for database changes that Laravel doesn’t provide.
- 📸 Auto-Snapshots – Capture schema before every migration
- 🛡️ Danger Detection – Warn about risky operations (DROP TABLE, DROP COLUMN, etc.)
- 🔄 Rollback Flow – Execute a rollback procedure with safety checks; table recreation steps are currently logged (scaffold), not auto-applied
- ⚡ Risk Analysis – Calculate rollback safety before executing
- 📊 Change Tracking – Complete audit trail of what changed and when
php artisan migrate
# 📸 Pre-migration snapshot saved (ID: 123)
# ⚠️ DANGEROUS CHANGES DETECTED!
# ❌ Column 'users.email' was dropped (Risk: HIGH)
# 🔄 To rollback, use: php artisan schema:rollback 123- PHP 8.2+
- Laravel 11.0+
- Database supported by Laravel Migrations
composer require ludovicguenet/whizbangphp artisan vendor:publish --tag=whizbang-configphp artisan migratephp artisan schema:snapshot --reason="before-hotfix"php artisan schema:status
# Recent Snapshots:
# ID | Reason | Created At | Tables
# 123 | pre_migration | 2024-08-11 10:30:00 | 15
# 122 | manual | 2024-08-11 09:15:00 | 15php artisan schema:rollback 123
# ⚠️ You are about to rollback your database schema!
# ✅ Rollback safety check passed
# Are you absolutely sure? (yes/no): yes
# ✅ Rollback flow executed. Table recreation steps were logged (no destructive actions applied automatically)# Take a snapshot
php artisan schema:snapshot --reason="before-release"
# Check status and history
php artisan schema:status
# Rollback to a snapshot
php artisan schema:rollback 123
# Force rollback (skip safety checks)
php artisan schema:rollback 123 --force- Production Deployments – Auto-snapshot before migrations
- Hotfixes – Quick rollback when things go wrong
- Schema Auditing – Track all database changes
- Team Safety – Prevent dangerous operations
- Compliance – Maintain schema change history
Laravel focuses on forward migrations, but offers no built-in way to:
- Track actual schema changes
- Analyze safety of those changes
- Rollback schema changes without full backups
- Warn about dangerous operations
Every Laravel developer has been burned by this. Whizbang closes that gap.
We welcome contributions!
git clone https://github.com/ludoguenet/whizbang.git
cd whizbang
composer install
vendor/bin/pestWhizbang is open-source software licensed under the MIT License.
If you discover security vulnerabilities, please email ludo@epekta.com instead of using the issue tracker.
🛡️ Made with ❤️ by Ludovic Guénet for the Laravel community 🛡️