PHPackages                             mtoolkit/mtoolkit-evolutions - 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. mtoolkit/mtoolkit-evolutions

ActiveProject

mtoolkit/mtoolkit-evolutions
============================

Agile way to manage the releases of your database.

1.2.0(10y ago)017[2 issues](https://github.com/mtoolkit/mevolution/issues)LGPL-3.0+PHPPHP &gt;=5.5.0

Since Jan 23Pushed 10y ago1 watchersCompare

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

READMEChangelog (5)DependenciesVersions (5)Used By (0)

MToolkit - Evolution
====================

[](#mtoolkit---evolution)

Agile way to manage your database releases.

Why
---

[](#why)

In the agile world you have to deploy quickly the new implementations of the software. Tracking and managing the changes of the database is difficult and boring. MToolkit - Evolution tries to make this task easy. We have been inspired by Play Framework: You can track the database evolutions in your project (in a dedicated folder) and you can apply them for the release.

How to use
----------

[](#how-to-use)

In your project, create one or more (one per each environment) .ini file like this:

```
username = root
password = passwd
host = 127.0.0.1
type = mysql
dbname = mevolution_test

```

This file will be used to connect to the database where you apply or revert the evolutions.

In a folder put the evolutions files. The names of the files must be 1.sql, 2.sql, etc. The content of the files must be like this:

```
-- UP

CREATE TABLE test01
(
  id          INT,
  field01     VARCHAR(255),
  field02     VARCHAR(255),
  start_date  DATE,
  end_date    DATE,

  PRIMARY KEY
  (
    id,
    field01,
    start_date
  )
);

-- DOWN
DROP TABLE test01;
```

**UP and DOWN placeholders are mandatory.**The UP queries will execute when you apply the evolutions. The DOWN queries will execute when you revert the evolutions.

### Init

[](#init)

To initializate the database and before applying new evolutions, run the command:

```
php mevolution.phar init -s=path_to_the_ini_file -e=path_of_the_evolutions_folder
```

### Apply evolutions

[](#apply-evolutions)

To apply the evolutions run:

```
php mevolution.phar apply -s=path_to_the_ini_file -e=path_of_the_evolutions_folder
```

### Revert evolutions

[](#revert-evolutions)

To revert the evolutions run:

```
php mevolution.phar revert -s=path_to_the_ini_file -e=path_of_the_evolutions_folder
```

To revert to a specific evolution use "-to=" argument:

```
php mevolution.phar revert -s=path_to_the_ini_file -e=path_of_the_evolutions_folder -to=1
```

The "down" query "1" will be executed.

Create PHAR executable
----------------------

[](#create-phar-executable)

MToolkit Evolution uses [box-project](http://box-project.github.io/box2/) to create the PHAR file.

To create the PHAR executable, run the following command in the root of the project:

```
php box.phar build -c manifest.json
```

Not supported
-------------

[](#not-supported)

- Using DELIMITER in the evolutions file.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 54.5% 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 ~6 days

Total

4

Last Release

3741d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/54174b486ef5d6d77393eb809b711419a03e30aa4e616df47c6871a2487f3f84?d=identicon)[mtoolkit](/maintainers/mtoolkit)

---

Top Contributors

[![mtoolkit](https://avatars.githubusercontent.com/u/16403140?v=4)](https://github.com/mtoolkit "mtoolkit (24 commits)")[![MpStyle](https://avatars.githubusercontent.com/u/527046?v=4)](https://github.com/MpStyle "MpStyle (20 commits)")

### Embed Badge

![Health badge](/badges/mtoolkit-mtoolkit-evolutions/health.svg)

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

PHPackages © 2026

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