Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Migrate Recreate Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. huangdijia/laravel-migrate-recreate is a single-purpose Artisan command package: it drops all tables in the connected database and re-runs migrations in one step. Architecturally it is a thin console layer over Laravel's own db:wipe + migrate primitives — one service provider, no domain coupling, no persistence, no runtime middleware. Its correct placement is require-dev in application repos and test harnesses only. It contributes nothing to production request paths.

Integration feasibility. Very high, mechanically. composer require --dev huangdijia/laravel-migrate-recreate with package auto-discovery yields a working migrate:recreate command in under an hour including verification. There is no published config to manage, no published migrations, no queue/event surface.

Technical risk. The dominant risk is not the code, it is the command's blast radius: a destructive, non-interactive-by-default table drop reachable by anyone with shell access to the container. Secondary risks: (a) the v2.1.0 changelog is an empty compare link, so the actual diff — and therefore backward-compatibility guarantees — is unverified; (b) single-maintainer personal package with no vendor backing or observable security policy; (c) interaction with schema:dump / schema.sql is undocumented, so a dump-based project may find its schema file untouched while tables are dropped, producing an inconsistent state.

Key questions to resolve before adoption.

  1. What is actually in the 2.0.0→2.1.0 diff? Read the compare view and file-level changes; a minor bump with no notes is not evidence of a compatibility guarantee.
  2. What are the declared illuminate/* and PHP constraints, and does v2.1.0 add Laravel 11/12 support?
  3. Does the command require --force in non-local environments, or does it prompt? Is there any environment guard?
  4. How does it treat schema:dump artifacts and the migrations table?
  5. Release cadence and issue responsiveness over the last 12 months — is this package a going concern?

Integration Approach

Stack fit. Laravel applications on PHP 8.x using standard artisan and a relational database (MySQL/Postgres/SQLite). It fits cleanly alongside migrate:fresh, db:wipe, and test-DB reset tooling. It does not fit projects that rely on hand-managed production schema or shared long-lived dev databases.

Migration path. From 2.0.0 to 2.1.0: treat as low risk, constrain to ^2.1 in require-dev and let a green CI run validate. From 1.x: assume a major-version break — do not let a loose * constraint float across the boundary; pin ^1 until the command surface is re-verified. Because the package is dev-only, rollback is a one-line composer change with no data migration.

Compatibility checks. Confirm the constraint matrix against the project's supported Laravel and PHP versions. Check for conflicts with other migrate-adjacent packages (doctrine/dbal-dependent tooling, laravel/schema-dump workflows) and with any custom migrate command overrides. Verify behaviour on the specific database driver used in CI, since drop-all semantics differ on SQLite versus Postgres with open connections.

Sequencing.

  1. Read the 2.1.0 diff and record the finding in the dependency register.
  2. Add as require-dev, run locally against a disposable database.
  3. Adopt in the CI test job as the per-shard reset step; observe flakiness across two weeks.
  4. Verify production image builds use --no-dev and that the command is absent from the prod container's artisan list.
  5. Publish a one-paragraph guardrail in the engineering runbook, then declare it standard.

Operational Impact

Maintenance. Low ongoing cost: no config drift, no upgrade treadmill beyond Laravel major-version alignment. The real maintenance item is the dev-dependency review cycle — this package should sit in the "review each Laravel major" bucket, not the "review each release" bucket.

Support. Community-only. No SLA, no vendor escalation path, no guaranteed CVE response. Acceptable for a dev tool; unacceptable if anyone argues for promoting it into deployment automation against shared environments.

Scaling. Not a throughput concern — the command is invoked per developer or per CI shard, not per request. The practical scaling dimension is CI: parallel test jobs each needing an isolated database must each run it, so wall-clock cost is migration count × shards. For large schema sets, prefer a schema dump plus a narrow reset over drop-and-remigrate.

Failure modes.

  • Catastrophic: executed against a non-local or shared database; all tables dropped with no recovery beyond backup. This is the failure mode that justifies the entire governance effort around the package.
  • Partial: drop succeeds, migration fails mid-run, leaving a half-built schema that looks like a code defect rather than a tooling failure.
  • Silent inconsistency: schema:dump projects where the dump file is not regenerated, so the drop is invisible until the next fresh provisioning.
  • Abandonment: maintainer stops publishing and a later Laravel major silently breaks the command; caught at upgrade time, not runtime, so impact is bounded.

Ramp-up. Effectively zero for anyone who has used migrate:fresh. The training requirement is not usage, it is the safety briefing: state plainly in the runbook that this command is local-and-CI only, that production images must exclude dev dependencies, and that it is never to be wired into a deployment step or a shared-environment script. One paragraph, delivered at onboarding, is sufficient.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox