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

Migrations Laravel Package

laravel-auto/migrations

Laravel package that generates migration files automatically from your existing database schema, letting you version-control tables without writing migrations by hand. Inspects your tables and columns, then scaffolds matching up and down migrations.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package's premise — co-locating schema definition with the Eloquent model via a static migration(Blueprint $table) method — is a legitimate pattern with strong precedents (Rails, Django, Prisma). It collapses two artifacts (model + migration file) into one, which is genuinely attractive for greenfield work and for AI-assisted code generation where keeping parallel files in sync is the failure point. The friction is that it diverges from Laravel's canonical, file-versioned migration contract. Laravel's migrations table, batch numbering, migrate:status, migrate:rollback, and schema:dump all assume an append-only sequence of timestamped files. This package replaces that with desired-state derived from current model source, which is a fundamentally different model (declarative convergence vs. imperative history).

The critical unknown: the docs never state whether migrate:auto creates missing tables only or diffs the model against live schema and alters. The troubleshooting entry "Schema changes not applying: check that your migration method signature matches" hints at a narrow create-if-absent implementation, but this must be confirmed in source before any decision.

Integration feasibility. Low coupling, small surface area: one convention, three commands (make:amodel, migrate:auto, migrate:auto-discover), one ordering property ($migrationOrder). No framework patching implied. Documented coexistence with traditional migrations (traditional first, auto after) means an incremental adoption path exists. The DSL is just Blueprint, so developer knowledge transfer is near-zero.

Technical risk. High, and driven mostly by project health rather than the idea:

  • Zero validation signal. 0 stars, 0 dependents, 0 production users. No evidence anyone has run this against a real database.
  • No rollback path documented. No down(), no down-migration strategy, no mention of destructive-change guards. This alone disqualifies it from any schema containing regulated or irreplaceable data.
  • Ordering by hand. $migrationOrder as an integer property is a manual topological sort. It has no conflict resolution, no cycle detection, and no visibility — versus Laravel's timestamped ordering which at least fails loudly.
  • DDL becomes invisible. Schema changes live inside model class bodies, so a PR diff shows a model edit, not a migration. Change-review, DBA sign-off, and audit trails all degrade.
  • Release date anomaly. last release: 2026-10-22 is future-dated. Either an index artifact or a placeholder — treat the maintenance signal as unverified.
  • Documentation is an agent skill file, not package docs. There is no upgrade guide, no versioning policy, no changelog visible. The "docs" describe how to use it, not how it behaves under stress.

Key questions to resolve before committing (est. 1–2 days of spike work):

  1. Create-only or diff-based? If diff-based: does it emit ALTER? Does it detect and refuse column drops/type narrowing?
  2. Is there an up/down equivalent? Can a change be reverted?
  3. Does it write to Laravel's migrations table, and does it participate in migrate, migrate:status, migrate:rollback?
  4. DDL transaction semantics per driver (MySQL implicit commits) — how are partial failures handled?
  5. Multi-connection and multi-tenant support? schema:dump / squashing compatibility?
  6. Behavior on rename — does it see a rename or a drop+create?
  7. Who maintains it? Is chareka-legacy an archived namespace?

Integration Approach

Stack fit. Good for Laravel 10/11/12 with PHP 8.x — the Blueprint API is stable across these, so the DSL is portable and low-risk to adopt syntactically. Best fit is greenfield, single-owner, low-blast-radius code: internal tools, admin panels, prototypes, hackathon/MVP builds, and AI-generated scaffolding where the model+schema sync problem is acute. Poor fit for anything with a shared database, external consumers, or a compliance boundary.

Migration path — do not retrofit. Retrofitting an existing production schema is the highest-risk use and should be explicitly out of scope. Instead:

  • Adopt for new bounded contexts only — a new module in a modular monolith, or a new service with its own database.
  • Keep canonical timestamped migrations for any existing table and for anything touching money, PII, or an audit surface.
  • If adopting, vendor/fork and pin to a specific commit, not a version constraint. With 0 dependents, upstream breakage is your problem regardless of semver, and you want the source in your repo for patch capability.

Compatibility caveat that will bite. Traditional migrations run first, auto-migrations after. That means a traditional migration cannot declare a foreign key to an auto-migrated table — the table doesn't exist yet at that point. Any plan to bridge legacy and new modules via FKs inverts this ordering and will fail. Plan new modules as FK-takers, not FK-providers, to legacy.

Sequencing (2-sprint horizon):

  1. Spike (3–5 days). Stand up a throwaway Laravel app, exercise an alter, a rename, a FK order violation, and a rollback. Answer questions 1–6 above from source, not docs.
  2. Decision gate. If no diff/rollback capability exists, scope it to greenfield create-only or reject.
  3. Pilot (1 sprint). One new module, no inbound FKs from legacy tables, no regulated data. Instrument: run migrate:auto --info in CI to catch drift between model source and a disposable schema.
  4. Governance. Add a PR checklist rule: any change to a migration() body requires reviewer sign-off, because the diff no longer looks like a schema change. Add a CI job that runs migrate:auto-discover and fails if discovery count changes unexpectedly.
  5. Reassess. Build-vs-adopt review once you know whether you're maintaining 200 lines or 2,000.

Operational Impact

Maintenance. Assume full ownership from day one. Zero stars, zero dependents, and an unverified release date mean there is effectively no upstream. Budget ~1 week/year of fork maintenance plus per-Laravel-major validation — modest in absolute terms, but it must be someone's named responsibility or it becomes silent debt. Weigh this against the cost saved per new table (roughly 15 minutes of boilerplate), which is real but small.

Support. None. No community, no issue triage cadence, no security disclosure path. Escalation route is "read the source." This is acceptable for a dev-velocity tool, unacceptable for anything on the critical path of a production deploy. Set expectations explicitly with the team so nobody assumes it's supported like first-party Laravel.

Scaling. This is the sharpest risk. Schema changes against large tables are where declarative sync tools fail: long-running DDL, table locks, and no integration with online-DDL tooling (gh-ost, pt-online-schema-change). Laravel's own migrations are already weak here; a package with no online-migration story is worse. Also note the per-model reflection/discovery cost grows with model count — fine at 50 models, worth measuring at 500. Constrain to databases where a lock is tolerable, and cap the number of auto-migrated tables as an explicit policy.

Failure modes to monitor:

  • FK ordering violation — $migrationOrder mis-set; fails at deploy, not at PR time. Mitigation: CI runs auto-migrate against a disposable schema on every branch.
  • Silent drift — a model's migration() edited but migrate:auto never run in the target environment; local and prod schemas diverge with no artifact recording the difference. Mitigation: schema snapshot in CI.
  • Destructive change — a field removed from the method; if diff-based, a column drops with no down(). Mitigation: never point this at a database whose recovery time exceeds your backup restore time.
  • --fresh / --force foot-guns — data-wiping and prod-bypass flags in the same CLI namespace as routine commands. Mitigation: block both in CI and shell aliases; require a second approval in the deploy pipeline.
  • No audit trail — compliance reviewers cannot see schema history as a discrete artifact. Mitigation: generate and commit a schema dump on every merge.
  • Abandonment — a Laravel 13 major lands, Blueprint changes, package doesn't follow. Mitigation: pinned fork; a documented exit plan (expand each migration() body into a conventional migration file — a mechanical, ~1-day-per-30-tables conversion).

Ramp-up. Developer ramp-up is genuinely trivial: 1–2 hours, because the DSL is the Blueprint API developers already know and the command surface is three commands. The real ramp-up cost is organizational, not technical — teaching the team that schema review no longer surfaces in the migration directory, and that --fresh is not a debugging tool. Plan a 30-minute team briefing plus a written convention doc, and treat the CI guards above as the enforcement mechanism rather than relying on discipline.

Recommendation. Fund a 3–5 day spike, not an adoption. The opportunity score (45.28) reflects a real, recurring pain point — model/schema drift, especially in AI-generated code — but the maturity signals (score 19.56, 0 dependents, no documented rollback, future-dated release, agent-skill-file documentation) do not support production commitment today. If the spike confirms create-only with clean rollback and Laravel command integration, pilot on one greenfield module. If it confirms create-only with no down(), either fork and build the rollback layer yourself, or copy the pattern into 150 lines of in-house Artisan command and keep the dependency at zero.

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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast