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.
Adopt when most of the following hold:
Look elsewhere or proceed with caution when:
doctrine/dbal:^4.0 requirement on the 12.x line, which may conflict with other packages still on DBAL 3.To executives: This is a free, open-source Laravel package that converts an existing database into version-controlled migration files. Its practical value is risk and cost reduction on two roadmap items: moving a legacy application onto Laravel, and changing database engines. The new 12.0.2 release resolves a dependency conflict that previously blocked Laravel 12 projects, so the tool is usable on our current stack with no licensing cost and no vendor commitment.
To engineering: migrations-generator 12.0.2 aligns the Laravel 12 line with doctrine/dbal:^4.0, resolving the Carbon 3 → carbon-doctrine-types:^3 → DBAL 4 chain that previously forced a DBAL 3 pin and caused an ecosystem mismatch. It handles both DBAL schema manager APIs (createSchemaManager() on DBAL 4, getSchemaManager() fallback for older implementations), ships a regression test for that selection logic, and documents the 12.x compatibility story. Practical guidance: install as a dev dependency, generate a baseline migration set, review the output (especially enum, JSON, and index handling), then treat Laravel migrations as the source of truth going forward. Known constraint: DBAL 4 requirement may collide with other packages still on DBAL 3 — verify with a dependency resolution dry run before merging.
How can I help you explore Laravel packages today?