PHPackages                             doublemcz/dibi-migrations - 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. doublemcz/dibi-migrations

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

doublemcz/dibi-migrations
=========================

Simple database migration layer based on dibi

1.1.2(11y ago)0414BSD-3-ClausePHPPHP &gt;=5.3.0

Since Nov 27Pushed 10y ago1 watchersCompare

[ Source](https://github.com/doublemcz/dibi-migrations)[ Packagist](https://packagist.org/packages/doublemcz/dibi-migrations)[ RSS](/packages/doublemcz-dibi-migrations/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

Dibi Migrations - DEPRECATED
============================

[](#dibi-migrations---deprecated)

Dibi migrations can be installed over [composer](https://getcomposer.org/download/).

#### Installation

[](#installation)

```
composer require doublemcz/dibi-migrations

```

#### Basic usage

[](#basic-usage)

Include following code into your script where you would like to migrate database

```
$config = array(
	'driver' => 'mysql',
	'host' => 'localhost',
	'user' => 'root',
	'password' => '',
	'database' => 'dibi-migrations',
);
$dibiConnection = new DibiConnection($config);
$migrationsPath = __DIR__ . '/migrations';
$tempDirectory = __DIR__ . '/temp';

$engine = new doublemcz\DibiMigrations\Engine($dibiConnection, $migrationsPath, $tempDirectory);
$engine->process();

```

#### Usage in Nette 2.2

[](#usage-in-nette-22)

You can use Nette Extension to initialize Engine and run migrations automatically. Into your config.neon add following line

```
extensions:
 dibiMigrations: Doublemcz\DibiMigrations\DibiMigrationsNetteExtension22

```

#### Creating migrations

[](#creating-migrations)

Migration folder consist of identificators of people who develop new code. You must use something unique for each developer. The structure of migration dir should looks as follows:

```
 app =>
  doublem =>
    2014_12_24_18_00.sql
    2014_12_31_23_00.sql
  foglcz =>
    2015_01_01_17_05.sql

```

You can see two migrations from user **doublem**. The first one was created at 18:00 on 24.12.2014. Another user **foglcz** created migration on 1.1.2015 at 17:05.

It is really necessary to keep valid dates because if you do a deploy into production the Engine sorts the migrations and deploy them in right order.

Temp dir is needed to save temporary migration folder status file. It holds the count of migrations and lock file. Migration status folder (db-migration.dat) has count of files. Migration lock file (db-migration.lock) is created while an upgrade is running.

I recommend you to look into ./example/index.php.

At the end I would like to thank to David Grudl who is founder of dibi library.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

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

Total

4

Last Release

4206d ago

PHP version history (2 changes)1.0PHP &gt;=5.2.0

1.1PHP &gt;=5.3.0

### Community

Maintainers

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

---

Top Contributors

[![doublemcz](https://avatars.githubusercontent.com/u/2649184?v=4)](https://github.com/doublemcz "doublemcz (25 commits)")

### Embed Badge

![Health badge](/badges/doublemcz-dibi-migrations/health.svg)

```
[![Health](https://phpackages.com/badges/doublemcz-dibi-migrations/health.svg)](https://phpackages.com/packages/doublemcz-dibi-migrations)
```

###  Alternatives

[tharos/leanmapper

Tiny ORM based on powerful Dibi database abstraction library for PHP.

93157.3k32](/packages/tharos-leanmapper)

PHPackages © 2026

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