PHPackages                             ganeshk007/migration-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. ganeshk007/migration-generator

ActiveLibrary[Database &amp; ORM](/categories/database)

ganeshk007/migration-generator
==============================

A Laravel package for generate migrations

v1.0.1(10mo ago)03MITPHPPHP &gt;=8.0

Since Jun 16Pushed 10mo agoCompare

[ Source](https://github.com/Ganeshk007/migration-generator)[ Packagist](https://packagist.org/packages/ganeshk007/migration-generator)[ RSS](/packages/ganeshk007-migration-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Laravel Migration Generator
===========================

[](#laravel-migration-generator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6372f638874e376c78b03b4d611d62a89d160047e200140165076772588c5a38/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67616e6573686b3030372f6d6967726174696f6e2d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ganeshk007/migration-generator)[![Total Downloads](https://camo.githubusercontent.com/db8c1fcd05d8cf375418c7215aaab087bff2689b3b66c0de332fa34a049e2510/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67616e6573686b3030372f6d6967726174696f6e2d67656e657261746f722e7376673f7374796c653d666c61742d737175617265266361636865427573743d32)](https://packagist.org/packages/ganeshk007/migration-generator)

A Laravel package to generate migration files from existing database tables — perfect for legacy projects that don't have migrations. This tool helps developers generate migration files for all tables in one go, improving workflow and making future table changes manageable.

---

🚀 Features
----------

[](#-features)

- 🔄 Generate migrations from existing tables
- 📂 Support for generating all or selected tables
- ⚙️ Custom configuration via a published config file
- 🧼 Clean and Laravel-style migration syntax
- 🧾 Supports indexing, unique, nullable, and default column properties

---

📦 Installation
--------------

[](#-installation)

```
composer require ganeshk007/migration-generator
```

---

⚙️ Configuration (Optional)
---------------------------

[](#️-configuration-optional)

To publish the configuration file:

```
php artisan vendor:publish --tag=config
```

This creates a config file at:

```
config/migration-generator.php

```

You can configure which tables to include or exclude:

```
return [

    // List of tables to exclude (e.g. Laravel system tables)
    'exclude_tables' => [
        'jobs',
        'failed_jobs',
        'password_resets',
        'oauth*'
    ],
];
```

---

⚙️ Usage
--------

[](#️-usage)

Generate migration files using:

```
php artisan migration:generate {table?}
```

### Optional Parameters

[](#optional-parameters)

- `table`: (optional) The name of a specific table to generate a migration for. If not provided, migrations will be generated for all tables (excluding those in config).

**Examples**:

```
php artisan migration:generate
php artisan migration:generate users
```

---

🧪 Example Output
----------------

[](#-example-output)

For a `users` table, the generated migration will look like:

```
Schema::create('users', function (Blueprint $table) {
    $table->id();
    $table->string('name');
    $table->string('email')->unique();
    $table->timestamp('email_verified_at')->nullable();
    $table->string('password');
    $table->rememberToken();
    $table->timestamps();
});
```

---

👨‍💻 Contributing
----------------

[](#‍-contributing)

Pull requests are welcome! Here's how to contribute:

1. Fork the repository
2. Create your feature branch: `git checkout -b feature/your-feature`
3. Commit your changes: `git commit -am 'Add new feature'`
4. Push to the branch: `git push origin feature/your-feature`
5. Open a Pull Request

---

🧾 License
---------

[](#-license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

---

🙋 Author
--------

[](#-author)

**Ganesh Kumar**
🔗

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance53

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

326d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cfcd01fe81d547d046f1f0995009c696149feaf2c97d10bedbd72caaf0279050?d=identicon)[Ganeshk007](/maintainers/Ganeshk007)

---

Top Contributors

[![Ganeshk007](https://avatars.githubusercontent.com/u/30888699?v=4)](https://github.com/Ganeshk007 "Ganeshk007 (7 commits)")

---

Tags

laravelmigrationsgenerate migrations

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ganeshk007-migration-generator/health.svg)

```
[![Health](https://phpackages.com/badges/ganeshk007-migration-generator/health.svg)](https://phpackages.com/packages/ganeshk007-migration-generator)
```

###  Alternatives

[kitloong/laravel-migrations-generator

Generates Laravel Migrations from an existing database

2.9k7.4M24](/packages/kitloong-laravel-migrations-generator)[xethron/migrations-generator

Generates Laravel Migrations from an existing database

3.3k3.3M23](/packages/xethron-migrations-generator)[jaybizzle/laravel-migrations-organiser

A Laravel package to help organise migration files.

116399.4k2](/packages/jaybizzle-laravel-migrations-organiser)[dragon-code/laravel-data-dumper

Adding data from certain tables when executing the `php artisan schema:dump` console command

3418.6k](/packages/dragon-code-laravel-data-dumper)[orptech/laravel-migration-partition

Laravel extensions that extends Illuminate to enable partitioned table creation within Laravel migrations.

3426.7k](/packages/orptech-laravel-migration-partition)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
