PHPackages                             dversion/dversion - 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. dversion/dversion

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

dversion/dversion
=================

Database versioning tool

0.4.0(5mo ago)62.4k↓50%[2 issues](https://github.com/dversion/dversion/issues)MITPHPPHP ^8.2

Since Nov 7Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/dversion/dversion)[ Packagist](https://packagist.org/packages/dversion/dversion)[ RSS](/packages/dversion-dversion/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (13)Used By (0)

Dversion
========

[](#dversion)

[![](https://avatars.githubusercontent.com/u/8125716?s=128)](https://avatars.githubusercontent.com/u/8125716?s=128)

A database versioning tool for PHP applications.

[![Latest Stable Version](https://camo.githubusercontent.com/0dafecf665b7c3ac620b3af1a2b2fecf6c16f1c296d77c7304de8bb5459d765d/68747470733a2f2f706f7365722e707567782e6f72672f6476657273696f6e2f6476657273696f6e2f762f737461626c65)](https://packagist.org/packages/dversion/dversion)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](http://opensource.org/licenses/MIT)

Introduction
------------

[](#introduction)

This tool allows you to version your database by creating sequential SQL files. This allows you to keep your local and production databases in sync, and re-create an up-to-date database from scratch when setting up a new development machine.

This tool is written in PHP, and mostly suited for being included in your PHP applications. It requires PHP 8.0 or later. Although extensible to other database vendors, it only supports MySQL for now.

Setup
-----

[](#setup)

- Install dversion with Composer: `composer require dversion/dversion`
- Create a `sql` directory at the root of your project
- Create a `dversion.php` configuration file at the root of your project:

```
