PHPackages                             ycheukf/migration - 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. ycheukf/migration

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

ycheukf/migration
=================

a migration Module like yii for zf2

1194PHP

Since Feb 14Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ycheukf/migration)[ Packagist](https://packagist.org/packages/ycheukf/migration)[ RSS](/packages/ycheukf-migration/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

migration
=========

[](#migration)

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

[](#introduction)

YcheukfMigration is a db migration module for zend framework 2. It just like YII. Project originally based on [ZfSimpleMigrations](https://github.com/vgarvardt/ZfSimpleMigrations), and support multiple db migration. Only run at command line.

Features / Goals
----------------

[](#features--goals)

- db migration like YII, ROR. (finished)
- mult db migration support. (finished)

Requirements
------------

[](#requirements)

- [PHP5](https://php.net/)
- [Zend Framework 2](https://github.com/zendframework/zf2) - Not needed to generate your models
- [ycheukf/debug](https://packagist.org/packages/ycheukf/debug) - A debug module for zf2

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

[](#installation)

**Install via git**

Clone this repo `git clone https://github.com/ycheukf/migration.git`

**Install via Composer**

Add this to your composer.json under "require": `"ycheukf/migration": "dev-master"`

Run command: `php composer.phar update`

Usage
-----

[](#usage)

1: add module 'YcheukfMigration' to your application.config.php

```
return array(
    'modules' => array(
        'YcheukfMigration',
        'Application',
    ),
);
```

2: get the helpinfo by running "php public/index.php"

Example
-------

[](#example)

1: generate a new migration-file in path/migrations/default

```
	php public/index.php migration generate
```

2: apply a migration (upgrade or downgrade) .

```
	php public/index.php migration up db;
//	or
	php public/index.php migration down db;
```

"db" is the key of the db-config array, usually written at path/config/autoload/global.php

```
	return array(
		'db' => array(//that is it
			'driver'         => 'Pdo',
			'dsn'            => 'mysql:dbname=myzf2;host=localhost',
			'username' => 'root',
			'password' => 'root',
			'driver_options' => array(
				\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''
			),
		),
//		...
	);
```

3: apply migration for all the db-array which is returned by an event "setDbConfigsFromEvent"

```
	php public/index.php migration up --dbsfromevent
//	or
	php public/index.php migration down --dbsfromevent
```

4: apply migration for a key "db" of the db-array which is returned by an event "setDbConfigsFromEvent"

```
	php public/index.php migration up db --dbsfromevent
//	or
	php public/index.php migration down db --dbsfromevent
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5100583?v=4)[ycheukf](/maintainers/ycheukf)[@ycheukf](https://github.com/ycheukf)

---

Top Contributors

[![ycheukf](https://avatars.githubusercontent.com/u/5100583?v=4)](https://github.com/ycheukf "ycheukf (2 commits)")

### Embed Badge

![Health badge](/badges/ycheukf-migration/health.svg)

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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