PHPackages                             vgarvardt/zf-simple-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. vgarvardt/zf-simple-migrations

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

vgarvardt/zf-simple-migrations
==============================

Module for database migrations management.

0.1.0(11y ago)2920.3k23[3 issues](https://github.com/vgarvardt/ZfSimpleMigrations/issues)[2 PRs](https://github.com/vgarvardt/ZfSimpleMigrations/pulls)BSD-3-ClausePHPPHP &gt;=5.3.3

Since Sep 10Pushed 4y ago8 watchersCompare

[ Source](https://github.com/vgarvardt/ZfSimpleMigrations)[ Packagist](https://packagist.org/packages/vgarvardt/zf-simple-migrations)[ Docs](https://github.com/vgarvardt/ZfSimpleMigrations)[ RSS](/packages/vgarvardt-zf-simple-migrations/feed)WikiDiscussions master Synced today

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

ZfSimpleMigrations
==================

[](#zfsimplemigrations)

Simple Migrations for Zend Framework 2. Project originally based on [ZendDbMigrations](https://github.com/vadim-knyzev/ZendDbMigrations) but module author did not response for issues and pull-requests so fork became independent project.

Supported Drivers
-----------------

[](#supported-drivers)

The following DB adapter drivers are supported by this module.

- Pdo\_Sqlite
- Pdo\_Mysql
- Pdo\_Pgsql
- Mysqli *only if you configure the driver options with `'buffer_results' => true`*

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

[](#installation)

### Using composer

[](#using-composer)

```
php composer.phar require vgarvardt/zf-simple-migrations:dev-master
php composer.phar update
```

add `ZfSimpleMigrations` to the `modules` array in application.config.php

Usage
-----

[](#usage)

### Available commands

[](#available-commands)

- `migration version []` - show last applied migration (`name` specifies a configured migration)
- `migration list [] [--all]` - list available migrations (`all` includes applied migrations)
- `migration apply [] [] [--force] [--down] [--fake]` - apply or rollback migration
- `migration generate []` - generate migration skeleton class

Migration classes are stored in `/path/to/project/migrations/` dir by default.

Generic migration class has name `Version` and implement `ZfSimpleMigrations\Library\MigrationInterface`.

### Migration class example

[](#migration-class-example)

```
