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 Migration Compatibility Laravel Package

konekt/laravel-migration-compatibility

A Laravel package for checking database migration compatibility, helping you catch potential issues before upgrading Laravel or deploying schema changes. Useful for keeping migrations safe and portable across environments.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for a narrow compatibility shim. The package solves one specific problem: deciding whether a foreign-key column should be int/unsignedInteger or bigInt/unsignedBigInteger to match the referenced table's primary key. That decision surfaces whenever migrations must run against schemas from different Laravel eras (pre-5.8 increments vs. post-5.8 bigIncrements). It is small enough that "build" (a helper trait or two methods in our own codebase) is a credible alternative to "buy."
  • Distribution strategy for packages with installable migrations. The clearest use case is for teams publishing Laravel packages or modules whose migrations get loaded into host applications with unknown key conventions. This package directly reduces the "your migration broke our database" support load.
  • Roadmap scoping for legacy/modern coexistence. Relevant to any plan that involves running new Laravel code against an older database, multi-tenant or multi-app shared schemas, or a gradual int→bigInt conversion rather than a flag-day migration.
  • Dependency risk accounting. With 0 stars, 0 dependents, and a low composite score (0.23), this should be evaluated as vendorable source rather than a strategic dependency. The PM decision is less "should we depend on this" and more "should we copy the approach into our own code."
  • Defect triage and support-cost reduction. Use it to close out the recurring class of migration failures caused by FK type mismatch, which otherwise show up as opaque errno: 150 foreign-key errors during php artisan migrate.
  • Not a differentiator. This is infrastructure hygiene, not product capability. It should not compete for roadmap space against customer-facing work; it belongs in engineering-enablement or package-maintenance budgets.

When to Consider This Package

Consider it when:

  • You maintain a Laravel package/library whose migrations are published into third-party applications, and you cannot assume the parent table's key type.
  • You have a genuinely mixed schema: legacy tables on int primary keys alongside newer bigInt tables, and a single coordinated conversion is not feasible in the near term.
  • You need a deliberately tiny, single-purpose helper and are prepared to pin the version, review the source (it is a small MIT-licensed library), and fork or vendor it if the maintainer goes inactive.
  • You are writing migration stubs that must remain installable across a range of supported Laravel versions.

Look elsewhere — or skip it — when:

  • The application is greenfield or has uniform bigInt keys. Laravel's native foreignId()->constrained() and foreignIdFor(Model::class) already handle this, with no extra dependency.
  • You can perform a one-time schema conversion to bigInt. Fixing the schema once is cheaper than carrying a compatibility layer indefinitely.
  • Procurement or platform policy requires dependencies with observable adoption. Zero stars and zero dependents means no community validation, no downstream bug reports, and no de facto maintenance guarantee.
  • Your supported Laravel floor is high enough that model-driven key-type detection covers the cases you actually hit.
  • You need documentation, support commitments, or a release cadence. None of that is evidenced here.

Adoption gate: treat adoption as conditional on the package remaining small and readable, on the version being pinned and vendored or forked where practical, and on a documented exit path (replace with native foreignIdFor() once the supported-version floor rises).

How to Pitch It (Stakeholders)

For executives (one paragraph): This is a small, MIT-licensed utility that prevents a specific and recurring class of database migration failure in Laravel — mismatched integer types on foreign keys, which cause installs and upgrades to fail outright. It is not a platform bet and carries no strategic weight. The signal we have is thin: no stars, no known dependents, a single-maintainer profile. We therefore recommend treating it as reference source rather than a dependency — either vendor the approach into our own package code or adopt it pinned with a fork plan. Cost is negligible; the benefit is fewer migration-related support tickets for anyone installing our packages into older applications.

For engineering (summary):

  • Problem it removes: php artisan migrate failing with foreign-key errors because a user_id column was declared unsignedInteger while users.id is unsignedBigInteger (or the reverse). This became common after Laravel 5.8 changed the default primary key to bigIncrements.
  • What it gives us: a way for a migration to inspect the related table's key type and declare a matching foreign-key column, instead of hardcoding one convention.
  • Why we might not take the dependency: the code surface is small enough to inline. A local helper — a trait with a foreignIdForTable()-style method, or a check against Schema::getColumnType() / the model's getKeyType() — gives us the same behavior with no third-party risk and no version-pinning overhead.
  • If we do adopt: pin the version in composer.json, note the fork path in the package README, and add a test that installs our package into a fixture app with int keys to keep the compatibility path honest.
  • Recommendation: evaluate for our package's migration stubs only. Default to native foreignIdFor() and a documented minimum Laravel version for everything else; reserve this package (or an inlined equivalent) for the genuinely mixed-schema case where the native helpers do not apply.
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.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
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