I’ve released an open-source CLI tool that generates Laravel migration files from existing MySQL, PostgreSQL, or MSSQL databases – including tables, indexes, foreign keys, and sorted by referential dependencies.
đź”§ Key features:
- Laravel 5 to 12 support
- Supports MySQL 5.7/8.0, PostgreSQL 15, and MSSQL 2022
- Auto-orders migrations to preserve integrity
- Modular export architecture (definition + mapping layers)
- CI-tested via full GitHub Actions matrix
- Fully extensible and framework-agnostic at its core
✨ Usage Example:
php artisan migrate:regenerate
This will generate Laravel migration files into database/migrations/, ordered and ready for version control.
📦 Install via Composer:
composer require n3xt0r/laravel-migration-generator –dev
đź”— GitHub: https://github.com/N3XT0R/laravel-migration-generator
Contributions and feedback are very welcome!