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 2mo ago

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 22% 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://www.gravatar.com/avatar/a92018135da109063aa8879d1f8ed3f0ab6ffeb73e5c3bf4ff68ecc5a69ec5ab?d=identicon)[ycheukf](/maintainers/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

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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