PHPackages                             pm-connect/db-diff - 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. pm-connect/db-diff

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

pm-connect/db-diff
==================

A simple php based tool/application for comparing and generating a diff/comparison of any two given databases. Supports multiple database drivers.

1.2.3(9y ago)022MITPHP &gt;=5.6.4

Since Dec 14Compare

[ Source](https://github.com/PM-Connect/db-diff)[ Packagist](https://packagist.org/packages/pm-connect/db-diff)[ RSS](/packages/pm-connect-db-diff/feed)WikiDiscussions Synced today

READMEChangelog (8)Dependencies (11)Versions (9)Used By (0)

DB Diff [![Latest Stable Version](https://camo.githubusercontent.com/c72d475a98c51a673cbc539bd912ddfe3730d8a268fa863114af14893c6de854/68747470733a2f2f706f7365722e707567782e6f72672f706d2d636f6e6e6563742f64622d646966662f762f737461626c65)](https://packagist.org/packages/pm-connect/db-diff) [![Total Downloads](https://camo.githubusercontent.com/1ff57867832573e086a13e66a851f60a7816c2d01c6c8bf0a92f29524139c2e5/68747470733a2f2f706f7365722e707567782e6f72672f706d2d636f6e6e6563742f64622d646966662f646f776e6c6f6164732e737667)](https://packagist.org/packages/pm-connect/db-diff) [![Latest Unstable Version](https://camo.githubusercontent.com/16237dee25bfb6952315ebf9e5b11d94224ed712716c52a1296fba40357304be/68747470733a2f2f706f7365722e707567782e6f72672f706d2d636f6e6e6563742f64622d646966662f762f756e737461626c652e737667)](https://packagist.org/packages/pm-connect/db-diff) [![License](https://camo.githubusercontent.com/1634a81cc8145a912813b9118819f953d719d4d132d691fd53cb3c950ee49967/68747470733a2f2f706f7365722e707567782e6f72672f706d2d636f6e6e6563742f64622d646966662f6c6963656e73652e737667)](https://packagist.org/packages/pm-connect/db-diff)
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#db-diff----)

A simple php based database structure diff tool that you can self host.

Looking to build a diff tool your self? Check out [db-diff-utils](https://github.com/PM-Connect/db-diff-utils).

[![DB Diff](https://raw.githubusercontent.com/PM-Connect/db-diff/master/public/img/db-diff.png)](https://github.com/PM-Connect/db-diff)

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

[](#installation)

Installation can be done through either composer, or using docker.

#### Using Composer

[](#using-composer)

You will need to install the project using a web server using php7+.

```
composer create-project --prefer-dist pm-connect/db-diff db-diff

```

#### Using Docker

[](#using-docker)

There is an available docker image and docker file with this project that will give you a running application within seconds.

Either create a machine from the `jralph/db-diff` docker image, or run the `Dockerfile` and create your own.

**Note:** When using docker to run the diff application, diffs will be run using the sync queue. This means that you will only be able to run one diff at a time and may be limited to the http request duration.

[Docker Hub](https://hub.docker.com/r/jralph/db-diff/)

### Config

[](#config)

You will need to set a database configuration to save the diff logs, this is done in a `.env` file, which you will need to create. An example is provided below.

Once done, you will also need to run the migrations.

```
php artisan migrate

```

You can also optionally setup a queue to enable better performance for diff running.

#### Example `.env` File

[](#example-env-file)

```
APP_ENV=local
APP_KEY=base64:1v0HsWYBr3Onmy5WNqIIs2/s3d0moHRg9IPK4ZD0/rY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://db-diff.dev

DB_CONNECTION=sqlite

QUEUE_DRIVER=database

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

```

#### Queues

[](#queues)

If you opt to use a queue driver that is not `sync`, you will need to run the build-in queue worker through the command line.

```
php artisan queue:listen --queue=default --timeout=120

```

You may also want to set the timeout to a greater value, depending on the size of the databases you are planning to diff. Generally a 60 second timeout works well in most cases.

For more information on running queue workers, please see [here](https://laravel.com/docs/5.3/queues#running-the-queue-worker).

Issues
------

[](#issues)

Please submit any issues using GitHubs build in issue management.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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 ~0 days

Total

8

Last Release

3483d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/394523?v=4)[Marcus Speight](/maintainers/wizbit)[@wizbit](https://github.com/wizbit)

---

Top Contributors

[![jralph](https://avatars.githubusercontent.com/u/3825404?v=4)](https://github.com/jralph "jralph (18 commits)")

---

Tags

diffdatabasemysqlpgsqlcomparisonPHP7sysadmin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pm-connect-db-diff/health.svg)

```
[![Health](https://phpackages.com/badges/pm-connect-db-diff/health.svg)](https://phpackages.com/packages/pm-connect-db-diff)
```

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k595.8M6.5k](/packages/doctrine-dbal)[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.6M218](/packages/backpack-crud)[ramadan/easy-model

A Laravel package for enjoyably managing database queries.

111.6k](/packages/ramadan-easy-model)[jrsaunders/shard-matrix

A Complete Database Sharding system for MYSQL and/or Postgres. Using Laravels Query Builder easily scale up your application. Configure your whole solution in one Yaml Config file.

271.5k](/packages/jrsaunders-shard-matrix)

PHPackages © 2026

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