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 Generator Laravel Package

oscarafdev/migrations-generator

Reverse-engineer an existing database into Laravel migrations. This package inspects your tables and generates migration files with columns, indexes, and foreign keys—ideal for legacy projects. Supports MySQL, PostgreSQL, SQLite, and SQL Server.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: migrations-generator is best treated as a development-time tool, not a production runtime dependency. It fits Laravel projects that need to reverse-engineer an existing database schema into Laravel migration files. The 12.0.2 release specifically aligns the Laravel 12 line with Carbon 3 and Doctrine DBAL 4, which is important for teams standardizing on Laravel 12.
  • Integration feasibility: The release is a patch-level fix but addresses a real ecosystem mismatch: Laravel 12 typically pulls Carbon 3, which expects Doctrine DBAL 4, while prior migrations-generator versions on the 12.x line still required DBAL 3. Updating to 12.0.2 should be a Composer-level change for most teams: require doctrine/dbal:^4.0 and update migrations-generator to 12.0.2. Runtime support for both createSchemaManager() and getSchemaManager() reduces the risk of schema-manager API divergence.
  • Technical risk: Moderate, not high. The main risks are dependency conflicts with other packages still pinned to DBAL 3, differences in DBAL 4 schema introspection behavior, and generated migration fidelity across database engines such as MariaDB and PostgreSQL. The added regression test for schema manager selection is a positive control, but it does not replace project-specific validation against the target schema.
  • Key questions: Does the application already use Doctrine DBAL 4, or do other dependencies pin DBAL 3? Which database engines and versions must be supported for migration generation? Is the package confined to local/dev/CI environments? Are generated migrations reviewed and tested before use? Does the team rely on MariaDB-to-PostgreSQL migration scenarios, and if so, are column types, indexes, foreign keys, and defaults validated? Which Laravel 12 minor and PHP versions are in scope?

Integration Approach

  • Stack fit: Strong fit for Laravel 12 projects using Doctrine DBAL 4 and Carbon 3. The package remains a developer/CI utility and should not be introduced into production request paths. Teams on older Laravel lines should remain on the appropriate package line rather than forcing the Laravel 12 constraints.
  • Migration path: Upgrade migrations-generator to 12.0.2 alongside doctrine/dbal:^4.0. Run composer update in a branch, resolve any transitive DBAL conflicts, and regenerate migrations against a representative database snapshot. Compare generated output with existing migrations or schema dumps before merging.
  • Compatibility: The 12.x line now requires DBAL 4, so compatibility with DBAL 3-dependent packages must be verified. The fallback to getSchemaManager() helps with older implementations, but the declared dependency still makes DBAL 4 the supported path. Database driver compatibility—especially MariaDB and PostgreSQL—should be tested explicitly.
  • Sequencing: First inventory Composer constraints for DBAL and Laravel 12 readiness. Second, update the package and DBAL in a dedicated branch. Third, run the package’s regression test plus project-level schema-generation tests. Fourth, validate generated migrations in staging. Fifth, document the supported Laravel/DBAL matrix and add the package to the team’s dependency-review checklist.

Operational Impact

  • Maintenance: Low runtime maintenance because the package is dev-only, but dependency hygiene matters. The team should track Laravel, Carbon, and DBAL major-version changes, and assign an owner for periodic Composer updates. The 12.0.2 release reduces near-term maintenance burden by fixing the Laravel 12/DBAL 4 mismatch.
  • Support: Support depends on the package maintainer and internal Laravel expertise. The updated compatibility documentation and regression test improve supportability, but teams should keep an internal runbook for generating and validating migrations from legacy schemas.
  • Scaling: Not a runtime scaling concern. The practical scaling limit is schema size and generation time: large databases with many tables, indexes, and foreign keys may produce slow or noisy output. Generation should run in CI or locally against sanitized schemas, not against production.
  • Failure modes: Common failure modes include Composer conflicts with DBAL 3-pinned packages, unsupported column types or database-specific features, inaccurate generated migrations for cross-engine moves such as MariaDB to PostgreSQL, and schema-manager API mismatches if the fallback path is not exercised. Generated migrations should always be reviewed and tested before deployment.
  • Ramp-up: Low for Laravel developers familiar with migrations and Composer. Moderate for teams moving from DBAL 3 to DBAL 4 because they need to understand schema introspection differences and validate generated output. A short internal guide covering supported Laravel/DBAL versions, target databases, and review steps should be 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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core