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

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

mike-sorokin/migration
======================

Migration generator for Phinx

0.2.0(9y ago)020MITPHPPHP ^5.6 || ^7.0

Since Jul 9Pushed 9y agoCompare

[ Source](https://github.com/MikeSorokin/migrations)[ Packagist](https://packagist.org/packages/mike-sorokin/migration)[ Docs](http://github.com/odan/migration)[ RSS](/packages/mike-sorokin-migration/feed)WikiDiscussions master Synced 4w ago

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

Migrations
==========

[](#migrations)

Migrations Builder for Phinx.

Currently Phinx (a migration library) cannot generate migrations automatically. Phinx "only" generates a empty class with up and down functions. You still have to write the migration manually.

In reality, you should rarely need to write migrations manually, as the migrations library "should" generate migration classes automatically by comparing your schema mapping information (i.e. what your database should look like) with your actual current database structure.

[![Screenshot](https://github.com/odan/migrations/raw/master/docs/images/screenshot01.jpg "Screenshot")](https://github.com/odan/migrations/blob/master/docs/images/screenshot01.jpg)

Generated migration

[![Screenshot 2](https://github.com/odan/migrations/raw/master/docs/images/screenshot02.jpg "Screenshot 2")](https://github.com/odan/migrations/blob/master/docs/images/screenshot02.jpg)

THIS IS A DEVELOPMENT PREVIEW - DO NOT USE IT IN PRODUCTION!

Features
========

[](#features)

- Framework independent
- DBMS: MySQL
- Database: character set, collation
- Tables: create, update, remove, engine, comment, character set, collation
- Columns: create, update, remove
- Indexes: create, remove
- Foreign keys (experimental): create, remove

### Not supported

[](#not-supported)

- MySQL \[double\] is not supported by phinx [cakephp/phinx#498](https://github.com/cakephp/phinx/issues/498)
- MySQL \[year\] is not supported by phinx. [cakephp/phinx#704](https://github.com/cakephp/phinx/pull/704) | [cakephp/phinx#551](https://github.com/cakephp/phinx/issues/551)
- MySQL \[bit\] is not supported by phinx. [cakephp/phinx#778](https://github.com/cakephp/phinx/pull/778)
- MySQL enum values with special characters: [cakephp/phinx#887](https://github.com/cakephp/phinx/issues/887)
- Migration of contraint names (currently only auto generated): [cakephp/phinx#823](https://github.com/cakephp/phinx/issues/823)
- MySQL comments with special characters.

Installation
============

[](#installation)

```
git clone https://github.com/odan/migrations.git
cd migrations
composer install --no-dev

```

Integration
===========

[](#integration)

```
composer require odan/migrations

```

Configuration
=============

[](#configuration)

- Default configuration file: migrations-config.php

Example:

```
