kitloong/laravel-migrations-generator
Generate Laravel migration files from an existing database schema, including columns, indexes, and foreign keys. Works with MariaDB/MySQL, PostgreSQL, SQL Server, and SQLite. Generate all tables or target/ignore specific tables via Artisan.
Schema builder, Blueprint, and migration system. No architectural conflicts with existing Laravel projects.--dev) and minimal Laravel setup (auto-registers service provider in Laravel 5.5+). Lumen support is explicit but requires 2 manual steps.php artisan migrate:generate), reducing learning curves for teams familiar with Laravel migrations.db:seed or eloquent:import.jsonb, SQL Server FILESTREAM)?Schema::hasTable() checks)?Schema builder and migration system. No middleware or facade conflicts.config/database.php setups.Schema::getColumnListing() for validation).php artisan (e.g., GitHub Actions, GitLab CI).migrations table, exclude test data tables).Blueprint compatibility).Schema::hasTable()).--squash for large schemas.--path="database/migrations/legacy") to segregate generated migrations.laravel-shift/database-diff) to track schema changes.citext, MySQL ENUM).Blueprint extensions, ensure they’re compatible with generated migrations.laravel-migrations, spatie/laravel-permission).SHOW CREATE TABLE or pg_dump).php artisan migrate:generate --tables="users,posts" --path="database/migrations/new" --squash
--tables="auth_*,orders_*").php artisan migrate:status).php artisan migrate --path="database/migrations/new").merge tool).INT vs. BIGINT).--log-with-batch to trace migration execution.DB::enableQueryLog()) to inspect SHOW CREATE TABLE calls.Xethron/migrations-generator docs for advanced use cases.--squash to reduce file I/O overhead.Blueprint.--table-filename patterns).config/database.php connections are correctly configured for each environment (e.g., --connection="staging").| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Corrupted generated migrations | Broken schema on migrate:fresh |
Validate migrations with php artisan migrate:status before deployment. |
| FK generation errors | Migration rollback fails |
How can I help you explore Laravel packages today?