huangdijia/laravel-migrate-recreate
Adds a migrate:recreate Artisan command to Laravel that rolls back and re-runs only the migrations you specify, instead of refreshing the whole database. Handy in development for iterating on a single migration while leaving other tables and their data intact.
migrate:rollback + migrate into one artisan call so local reset is a single step instead of a two-command sequence people get wrong (wrong batch, forgotten --step, stale state).composer run script or a project-local command instead.down() methods are meaningful and worth running; if they are, that also argues for investing in migration rollback quality as a team standard.Consider adopting when:
down() logic — dropping views, Postgres extensions/functions/triggers/partitions, revoking grants, cleaning object storage — that a table drop would not faithfully reproduce.require-dev, and keep it out of production images.Look elsewhere or skip when:
php artisan migrate:fresh --seed already covers you. For the large majority of Laravel apps it does, with zero added dependencies.down() methods are empty stubs — then rollback-and-migrate is strictly slower than dropping tables, and the package adds nothing.Release-specific caveat for v2.1.0: the only artifact is a full-changelog compare link (2.0.0...v2.1.0) with no release notes. It is a minor bump within 2.x, so no breaking change is signalled, but nothing is documented either. Treat the upgrade as unverified: read the commit diff, pin the exact version, and validate against a scratch database before rolling it into shared CI.
Executives: No product impact and no roadmap commitment. This is an internal developer-tooling micro-package that bundles two existing artisan commands into one; adopting or skipping it changes nothing a customer sees. Cost is effectively zero. The only real risk is a small third-party dependency and a single maintainer in the dev/CI toolchain — acceptable if pinned and dev-only, and avoidable entirely by writing a two-line script ourselves.
Engineering: v2.1.0 is a minor release off 2.0.0; the published notes contain only a compare link, so there is no stated breaking change but also no changelog to audit — pin the version and review the diff before upgrading. Functionally it's a convenience wrapper around rollback-and-migrate. The decision rule: adopt only if you can name a migration where dropping the table is not equivalent to running down(). If you can't, migrate:fresh is the correct answer and this is a dependency you don't need. If you can, take it as a require-dev dependency, keep it out of production images, and wire it into the CI reset step explicitly rather than relying on the default command behavior.
How can I help you explore Laravel packages today?