PHPackages                             d3vr/db2migrations - 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. d3vr/db2migrations

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

d3vr/db2migrations
==================

Artisan command to convert your current SQL database schema into Laravel 5.4.\* Migration files (one for each table).

31081PHP

Since Mar 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/d3vr/DB2Migrations)[ Packagist](https://packagist.org/packages/d3vr/db2migrations)[ RSS](/packages/d3vr-db2migrations/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

DB2Migrations
=============

[](#db2migrations)

This is a fork of [adamkearsley/laravel-convert-migrations](https://github.com/adamkearsley/laravel-convert-migrations):

- It adds support for **Laravel 5.4.**\*.
- Fixes some bugs (e.g: timestamp default values not working).
- Each table now has it's own migration file, instead of one file containing all the migrations.

---

This is an artisan command to convert your current SQL database schema into Laravel 5.4.\* Migration files (one for each table). It'll come really handy when you have started a Laravel project without using migrations, if you're migrating an old app to Laravel, or maybe you used a database designer to generate SQL.

Installation
------------

[](#installation)

1. Add the package to your composer.json file and run `composer update`:

```
"require": {
    "d3vr/db2migrations": "dev-master"
}
```

2. Add `d3vr\DB2Migrations\DB2MigrationsServiceProvider::class` to your `config/app.php` file, inside the `providers` array.

Usage
-----

[](#usage)

Now it's as easy as running `php artisan convert:migrations myDatabaseName`. Wait a few seconds and, automagically, you'll have the new migration files in `app/database/migrations`.

**Ignoring Tables**

You can even ignore tables from the migration if you need to. Just use the `ignore` option and separate table names with a comma: `php artisan convert:migrations --ignore="table1, table2"`.

Credits
-------

[](#credits)

Credits go to "bruceoutdoors" [original class](https://gist.github.com/bruceoutdoors/9166186).

###  Health Score

23

—

LowBetter than 30% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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/03c0785b1ef2df189dc84929f404e52ed40a59ca3d771f753186cd78857bbb1e?d=identicon)[d3vr](/maintainers/d3vr)

---

Top Contributors

[![adamkearsley](https://avatars.githubusercontent.com/u/4035484?v=4)](https://github.com/adamkearsley "adamkearsley (11 commits)")[![d3vr](https://avatars.githubusercontent.com/u/1549990?v=4)](https://github.com/d3vr "d3vr (7 commits)")[![uber1337](https://avatars.githubusercontent.com/u/5672733?v=4)](https://github.com/uber1337 "uber1337 (4 commits)")[![fadion](https://avatars.githubusercontent.com/u/374519?v=4)](https://github.com/fadion "fadion (1 commits)")[![ysugimoto](https://avatars.githubusercontent.com/u/1000401?v=4)](https://github.com/ysugimoto "ysugimoto (1 commits)")

---

Tags

laravelmigrationsphp

### Embed Badge

![Health badge](/badges/d3vr-db2migrations/health.svg)

```
[![Health](https://phpackages.com/badges/d3vr-db2migrations/health.svg)](https://phpackages.com/packages/d3vr-db2migrations)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k280.5M5.6k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k114.4M86](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k51.5M8.2k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k62.7M499](/packages/mongodb-mongodb)[spatie/laravel-translatable

A trait to make an Eloquent model hold translations

2.4k22.1M350](/packages/spatie-laravel-translatable)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.5k23.2M26](/packages/kirschbaum-development-eloquent-power-joins)

PHPackages © 2026

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