Download the PHP package muhammadhammadwaseem/db-mig-generator without Composer
On this page you can find all versions of the php package muhammadhammadwaseem/db-mig-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download muhammadhammadwaseem/db-mig-generator
More information about muhammadhammadwaseem/db-mig-generator
Files in muhammadhammadwaseem/db-mig-generator
Download muhammadhammadwaseem/db-mig-generator
More information about muhammadhammadwaseem/db-mig-generator
Files in muhammadhammadwaseem/db-mig-generator
Vendor muhammadhammadwaseem
Package db-mig-generator
Short Description Generate Laravel migrations from existing DB.
License MIT
Package db-mig-generator
Short Description Generate Laravel migrations from existing DB.
License MIT
Please rate this library. Is it a good library?
Informations about the package db-mig-generator
Laravel DB Migration Generator
Automatically generate Laravel migration files from an existing database schema — with built-in support for ENUM columns and zero manual setup.
🚀 Installation
composer require hammad123/laravel-db-migration-generator
✅ Compatible with Laravel 8, 9, and 10
✅ Supports MySQL, MariaDB
✅ Automatically handles enum columns (converted to string())
⚙️ Usage
Run the Artisan command to generate migrations from your current database:
php artisan hammad:migrate:generate
🔧 Options
Option Description
--connection= Use a specific DB connection from config/database.php
--path= Output path for generated migrations
🧠 ENUM Support
You don't need to manually map ENUM types — the package internally handles it.
Example:
status ENUM('active', 'inactive') DEFAULT 'active'
Will be converted to:
$table->string('status')->default('active');
📁 Configuration (Optional)
You can publish the config file to skip tables or customize paths:
php artisan vendor:publish --tag=config
This publishes: config/migration-generator.php
Inside, you can:
Skip specific tables
Change default stub path
Change default migration directory
✍️ Custom Stub
You can publish and customize the stub used for migrations:
php artisan vendor:publish --tag=stubs
This gives you: resources/stubs/migration.stub
You can edit the layout of the generated migration (e.g., indentation, formatting).
✅ Testing (For Contributors)
This package uses Orchestra Testbench to test migrations in a real Laravel environment.
Run tests:
composer install --dev
vendor/bin/phpunit
🤝 Contributing
Pull requests and feature suggestions are welcome!
If you find a bug or want a new feature, open an issue on GitHub.
📄 License
MIT © Hammad
📦 Coming Soon (Optional Features)
Column comments
Foreign key support
Relationships (HasMany, BelongsTo)
Laravel 11 support.
All versions of db-mig-generator with dependencies
PHP Build Version
Package Version
The package muhammadhammadwaseem/db-mig-generator contains the following files
Loading the files please wait ....