DEV Community

Ilya Beliaev
Ilya Beliaev

Posted on

Laravel Migration Generator: v8.1 & v8.2 Released ๐Ÿš€

I've recently shipped two updates to my Laravel Migration Generator project โ€“ focusing on database normalization, architecture cleanup, and future extensibility.


๐Ÿ”„ v8.1.0 โ€“ Schema Normalization

You can now normalize legacy schemas using the new --normalizer=pivot option:

  • Replaces composite primary keys with a synthetic $table->id() column
  • Preserves the original compound key as a UNIQUE constraint
  • Improves compatibility with Eloquent models

Ideal if you're working with databases that were not designed for Laravel-style ORM!


๐Ÿงฑ v8.2.0 โ€“ Refactored Execution Flow

This release introduces the SchemaMigrationExecutor and its interface to decouple execution logic from the console command:

  • Implements the Separation of Concerns principle (SoC)
  • Executor is now resolved via Laravel's service container
  • Optionally injects the SchemaNormalizationManagerInterface only when needed

Cleaner, more testable, and easier to extend.


๐Ÿ”ญ Up Next

I'm currently working on:

  • Caching โ€“ to improve performance for repeated runs
  • Model Generation โ€“ automatic Eloquent model scaffolding based on the schema

๐Ÿ› ๏ธ Try it out!

๐Ÿ‘‰ GitHub: https://github.com/N3XT0R/laravel-migration-generator

If you're migrating legacy databases or want to generate clean Laravel-compatible migrations โ€“ this tool might save you hours.


Thanks for reading โ€“ feel free to drop feedback or ideas for upcoming versions!

laravel #php #opensource #cli #migrations #eloquent #legacycode #cleanarchitecture #devlog

Top comments (0)