PHPackages                             rishpandey/laravel-auto-migration - 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. rishpandey/laravel-auto-migration

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

rishpandey/laravel-auto-migration
=================================

The package uses Doctrine DBAL in order to diff the existing tables with given model and make the necessary changes to it. If the table does not exist, it will create it.

01PHP

Since Oct 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/rishpandey/laravel-auto-migration)[ Packagist](https://packagist.org/packages/rishpandey/laravel-auto-migration)[ RSS](/packages/rishpandey-laravel-auto-migration/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel Automatic Migrations
============================

[](#laravel-automatic-migrations)

All credits to Kevin Dion, as this was initially a part of [swift](https://github.com/redbastie/swift).

### Installation

[](#installation)

```
composer require rishpandey/laravel-auto-migration

```

### Usage

[](#usage)

In order to use automatic migrations, simply specify a `migration` method in your model:

```
class Lead extends Model
{

    public function migration(Blueprint $table)
    {
        $table->id();
        $table->string('name');
        $table->timestamps();
    }

```

Now run the automatic migration command:

```
php artisan migrate:auto

```

The package uses Doctrine DBAL in order to diff the existing model table and make the necessary changes to it. If the table does not exist, it will create it.

By default the package looks under "App\\Models" for your models, but you can pass a `--base` to specify that models exists under "App":

```
php artisan migrate:auto --base

```

You can also pass `--fresh` and/or `--seed` to the `migrate:auto` command in order to get fresh migrations and/or run your seeders afterwards:

```
php artisan migrate:auto --fresh --seed

```

If your app contains traditional migrations in the `database/migrations` folder, they will be handled before the automatic migrations.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![rishpandey](https://avatars.githubusercontent.com/u/9201847?v=4)](https://github.com/rishpandey "rishpandey (1 commits)")

### Embed Badge

![Health badge](/badges/rishpandey-laravel-auto-migration/health.svg)

```
[![Health](https://phpackages.com/badges/rishpandey-laravel-auto-migration/health.svg)](https://phpackages.com/packages/rishpandey-laravel-auto-migration)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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