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 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

Compatibility Helper for Integer vs. BigInteger Problem in Laravel Migrations

Frequently asked questions about Laravel Migration Compatibility
What does konekt/laravel-migration-compatibility actually do?
It is a migration-time helper for the classic integer versus bigInteger mismatch in Laravel foreign keys. When a migration defines a foreign key column, the helper inspects the referenced table and column and returns a column definition that matches the referenced primary key type. That avoids errno 150 failures on MySQL and keeps reusable package migrations portable across host applications that use either increments or bigIncrements for the users table.
Which Laravel and PHP versions does this package support?
Check the require constraints in composer.json and the last commit date before assuming anything, because the package has zero stars and zero dependents and the Konekt ecosystem is largely Laravel 5.x through 8.x era. It is unlikely to be tested on Laravel 10, 11, or 12. If the declared constraints exclude your Laravel version, do not blindly use --ignore-platform-reqs; fork with an updated constraint or reimplement the helper locally.
Which database drivers does the schema introspection support?
That is not clearly documented and should be verified against each driver you run, not assumed. The safe assumption with an unmaintained package is MySQL only, with Postgres, SQLite, and SQL Server behavior untested. Write a small test that runs the helper against every connection in your CI matrix before trusting it.
How do I install konekt/laravel-migration-compatibility?
It is Composer-installable and MIT-licensed, so it is a normal composer require, ideally as a dev dependency since it only matters at migration time. Pin an exact version and record the upstream commit SHA, because the package is dormant and you effectively own the code once it is in your lockfile.
What happens if the referenced table or column does not exist yet?
Schema introspection needs a live connection and a table that already exists, so on migrate:fresh, in a fresh CI database, or when migration ordering puts the dependent migration first, the helper can fail or misbehave. There is no documented fallback guarantee. Treat that as a deployment-ordering hazard and test the exact ordering your migrations use.
Does the package fall back silently if it cannot resolve the reference?
Unknown, and silent wrong answers are the worst outcome here: a mismatched foreign key type may only fail later on MySQL with errno 150 or silently diverge between environments. Read the source before relying on it and prefer an explicit error over a default. If the helper swallows exceptions, add your own guard.
Is it a runtime dependency I need to worry about in production?
No, it does not participate in the application runtime: no service provider in the request path, no container bindings, no middleware. Its impact surface is migration-time only, which makes it easy to remove later. That also means it will not save you from a bad schema decision made at deploy time.
Does Laravel's built-in foreignIdFor or foreignId()->constrained() make this redundant?
For a single application you control on modern Laravel, yes: the default is bigIncrements and the native helpers already do the right thing. The package only earns its place if you maintain reusable modules or cross-version packages where the host application's ID convention is unknown. Do not add it to a monolith that already standardizes on bigIncrements.
Can I add it to migrations that already ran in production?
No. Only apply it to migrations that have not yet been deployed; retrofitting historical migrations is a no-op at best and a checksum or ordering surprise at worst. Treat it as a transitional dependency for new, undeployed migrations during a Laravel upgrade, not a permanent fixture.
Is the package maintained, and what are the alternatives?
Adoption is zero, so there are no bug reports, no driver-matrix testing, and no one else validating Postgres or SQLite behavior; assume you own the code and audit and pin it. Alternatives are Laravel's foreignIdFor() and foreignId()->constrained() plus Schema::getColumnType(), a fixed bigIncrements convention, or a small local helper you control. If the declared constraints do not fit, reimplementing the introspection in a few lines is usually cheaper than maintaining a fork.
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.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle