PHPackages                             beberlei/dbdeploy-php - 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. beberlei/dbdeploy-php

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

beberlei/dbdeploy-php
=====================

v1.0(11y ago)12142[1 PRs](https://github.com/beberlei/dbdeploy-php/pulls)PHPPHP ~5.4

Since Feb 9Pushed 10y ago2 watchersCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

DBDeploy PHP
============

[](#dbdeploy-php)

[![Build Status](https://camo.githubusercontent.com/ea45f51b52f9f605a730e735fd7e67e8694122220086fcc39b2ff3cbc77610ab/68747470733a2f2f7472617669732d63692e6f72672f62656265726c65692f64626465706c6f792d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/beberlei/dbdeploy-php)

This is a clone of [DBDeploy](http://dbdeploy.com) for PHP using Doctrine DBAL as database abstraction.

It supports only a limited set of functionality of the original Java based tool, but enough for one particular workflow to function perfectly.

Why? This is extracted from a testsuite where it was used for setting up the schema of the testing database. It is also much easier to setup than DBDeploy.

Workflow Assumptions
--------------------

[](#workflow-assumptions)

- Only .sql file based migrations, format `_.sql`
- Requires using backwards-compatible database changes, no support undo/down migrations. Especially
    - Avoid dropping stuff
    - Added column must either allow NULL or have a default value
- Orders migrations (natural sort) using number prefixes in files. Use `YYmmddHHii_.sql` format to allow branching without conflicts.
- Single database vendor per directory, use multiple for apps with different vendor support.
- Creates table `changelog` that contains current state of already applied migrations.

API
---

[](#api)

The API just has one method: `migrate()`:

```
