spatie/laravel-migrate-fresh
Adds a migrate:fresh Artisan command to drop all database tables and rebuild from migrations, even if you don’t implement down() methods. Supports MySQL, SQLite, PostgreSQL, and SQL Server. (Built into Laravel 5.5+)
down() methods in migrations.Adopt When:
down() methods in all migration files.Look Elsewhere If:
migrate:fresh is built-in post-5.5).*"This package solves a critical pain point in our development workflow: database resets take 10x longer than they should, costing the team hours weekly in debugging and manual cleanup. By adopting spatie/laravel-migrate-fresh, we can:
*"This is a drop-in replacement for migrate:refresh that works even when down() methods are missing. Key benefits:
php artisan migrate:fresh) to nuke and rebuild the entire database—no more down() headaches.--seed to repopulate data).*"Tired of migrate:refresh failing because someone forgot to write down()? This package fixes that with a brute-force table drop before running migrations fresh. Here’s how to use it:
composer require spatie/laravel-migrate-fresh.php artisan migrate:fresh (add --seed to repopulate data).
Pro tip: Add it to your .env scripts for local dev:alias db-reset='php artisan migrate:fresh --seed'
When to avoid: If you need backups or partial resets, use this only for full teardowns."*
How can I help you explore Laravel packages today?