PHPackages                             gtunes/phinx - 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. gtunes/phinx

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

gtunes/phinx
============

Phinx makes it ridiculously easy to manage the database migrations for your PHP app.

v0.2.5(13y ago)032MITPHPPHP &gt;=5.3.2

Since Oct 20Pushed 12y agoCompare

[ Source](https://github.com/gtunes/phinx)[ Packagist](https://packagist.org/packages/gtunes/phinx)[ Docs](http://phinx.org)[ RSS](/packages/gtunes-phinx/feed)WikiDiscussions 0.2.x-dev Synced yesterday

READMEChangelogDependencies (5)Versions (18)Used By (0)

[Phinx](http://phinx.org): Simple PHP Database Migrations
=========================================================

[](#phinx-simple-php-database-migrations)

[![Build Status](https://camo.githubusercontent.com/46bd033c7fe51ef65eabc43bbd523ead31ce90fcd33cdcd93ff3a95e11909f02/68747470733a2f2f7472617669732d63692e6f72672f726f626d6f7267616e2f7068696e782e706e673f6272616e63683d302e322e782d646576)](https://travis-ci.org/robmorgan/phinx)[![Latest Stable Version](https://camo.githubusercontent.com/73f4aff2e69752e905bc41be99f31aa70460e1f7603fd16bccc4b03dc757a630/68747470733a2f2f706f7365722e707567782e6f72672f726f626d6f7267616e2f7068696e782f76657273696f6e2e706e67)](https://packagist.org/packages/robmorgan/phinx)[![Total Downloads](https://camo.githubusercontent.com/0e4008132345ceefe1e76d10d1db405b18cd55882f11013c48e48234c59c7cbd/68747470733a2f2f706f7365722e707567782e6f72672f726f626d6f7267616e2f7068696e782f642f746f74616c2e706e67)](https://packagist.org/packages/robmorgan/phinx)

Phinx makes it ridiculously easy to manage the database migrations for your PHP app. In less than 5 minutes you can install Phinx and create your first database migration. Phinx is just about migrations without all the bloat of a database ORM system or framework.

**Check out  for the comprehensive documentation.**

### Phinx lets you

[](#phinx-lets-you)

- Write database migrations using database agnostic PHP code.
- Migrate up and down.
- Migrate on deployment.
- Get going in less than 5 minutes.
- Stop worrying about the state of your database.
- Take advantage of SCM features such as branching.

### Compared with other tools, Phinx *does not…*

[](#compared-with-other-tools-phinx-does-not)

- **Write log files.** The screen is better.
- **Try to do too much.** Migrations only.
- **Have unreadable source code.** We aim to be transparent.
- **Rely on a framework.** Phinx is independent. Use it with any app.
- **Support anything other than MySQL.** Feel free to fork and contribute if you desire.

Install &amp; Run
-----------------

[](#install--run)

### Composer

[](#composer)

The fastest way to install Phinx in your project is using Composer ().

1. Install Composer:

    ```
    curl -s https://getcomposer.org/installer | php

    ```
2. Add Phinx as a dependency to your `composer.json` file:

    ```
    {
        "require": {
            "robmorgan/phinx": "*"
        }
    }
    ```
3. Install Phinx:

    ```
    php composer.phar install

    ```
4. Execute Phinx:

    ```
    php vendor/bin/phinx

    ```

### As a Phar

[](#as-a-phar)

You can also use the Box application to build Phinx as a Phar archive ().

1. Clone Phinx from GitHub

    ```
    git clone git://github.com/robmorgan/phinx.git
    cd phinx

    ```
2. Install Composer

    ```
    curl -s https://getcomposer.org/installer | php

    ```
3. Install the Phinx dependencies

    ```
    php composer.phar install

    ```
4. Install Box:

    ```
    curl -s http://box-project.org/installer.php | php

    ```
5. Create a Phar archive

    ```
    php box.phar build

    ```

Contributing
------------

[](#contributing)

Start by forking Phinx on GitHub:

Next setup your environment for development:

- `curl -s https://getcomposer.org/installer | php`
- `php composer.phar install --dev`

News &amp; Updates
------------------

[](#news--updates)

Follow Rob (@*rjm*) on Twitter to stay to date ([http://twitter.com/\_rjm](http://twitter.com/_rjm)\_)

Misc
----

[](#misc)

### Version History

[](#version-history)

**0.2.5** (Sunday, 26th May 2013)

- Added support for Box Phar Archive Packaging
- Added support for MYSQL\_ATTR driver options
- Fixed a bug where foreign keys cannot be removed
- Added support for MySQL table collation
- Updated Composer dependencies
- Removed verbosity options, now relies on Symfony instead
- Improved unit tests

**0.2.4** (Saturday, 20th April 2013)

- The Rollback command supports the verbosity parameter
- The Rollback command has more detailed output
- Table::dropForeignKey now returns the table instance

**0.2.3** (Saturday, 6th April 2013)

- Fixed a reporting bug when Phinx couldn't connect to a database
- Added support for the MySQL 'ON UPDATE' function
- Phinx timestamp is now mapped to MySQL timestamp instead of datetime
- Fixed a docs typo for the minimum PHP version
- Added UTF8 support for migrations
- Changed regex to handle migration names differently
- Added support for custom MySQL table engines such as MyISAM
- Added the change method to the migration template

**0.2.2** (Sunday, 3rd March 2013)

- Added a new verbosity parameter to see more output when migrating
- Support for PHP config files

**0.2.1** (Sunday, 3rd March 2013)

- Broken Release. Do not use!
- Unit tests no longer rely on the default phinx.yml file
- Running migrate for the first time does not give php warnings
- `default_migration_table` is now actually supported
- Updated docblocks to 2013.

**0.2.0** (Sunday, 13th January 2013)

- First Birthday Release
- Added Reversible Migrations
- Removed options parameter from AdapterInterface::hasColumn()

**0.1.7** (Tuesday, 8th January 2013)

- Improved documentation on the YAML configuration file
- Removed options parameter from AdapterInterface::dropIndex()

**0.1.6** (Sunday, 9th December 2012)

- Added foreign key support
- Removed PEAR support
- Support for auto\_increment on custom id columns
- Bugfix for column default value 0
- Documentation improvements

**0.1.5** (Sunday, 4th November 2012)

- Added a test command
- Added transactions for adapters that support it
- Changing the Table API to use pending column methods
- Fixed a bug when defining multiple indexes on a table

**0.1.4** (Sunday, 21st October 2012)

- Documentation Improvements

**0.1.3** (Saturday, 20th October 2012)

- Fixed broken composer support

**0.1.2** (Saturday, 20th October 2012)

- Added composer support
- Now forces migrations to be in CamelCase format
- Now specifies the database name when migrating
- Creates the internal log table using its API instead of raw SQL

**0.1.1** (Wednesday, 13th June 2012)

- First point release. Ready for limited production use.

**0.1.0** (Friday, 13th January 2012)

- Initial public release.

### License

[](#license)

(The MIT license)

Copyright (c) 2013 Rob Morgan

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.8% 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 ~19 days

Total

12

Last Release

4784d ago

### Community

Maintainers

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

---

Top Contributors

[![robmorgan](https://avatars.githubusercontent.com/u/178939?v=4)](https://github.com/robmorgan "robmorgan (284 commits)")[![zuker](https://avatars.githubusercontent.com/u/476388?v=4)](https://github.com/zuker "zuker (10 commits)")[![joshribakoff](https://avatars.githubusercontent.com/u/4021306?v=4)](https://github.com/joshribakoff "joshribakoff (7 commits)")[![PeterUpfold](https://avatars.githubusercontent.com/u/1255375?v=4)](https://github.com/PeterUpfold "PeterUpfold (5 commits)")[![valorin](https://avatars.githubusercontent.com/u/897369?v=4)](https://github.com/valorin "valorin (3 commits)")[![gtunes](https://avatars.githubusercontent.com/u/5270782?v=4)](https://github.com/gtunes "gtunes (3 commits)")[![awbn](https://avatars.githubusercontent.com/u/603836?v=4)](https://github.com/awbn "awbn (2 commits)")[![jojosch](https://avatars.githubusercontent.com/u/327488?v=4)](https://github.com/jojosch "jojosch (1 commits)")[![hutushen222](https://avatars.githubusercontent.com/u/352215?v=4)](https://github.com/hutushen222 "hutushen222 (1 commits)")[![ghola](https://avatars.githubusercontent.com/u/932205?v=4)](https://github.com/ghola "ghola (1 commits)")[![EricHogue](https://avatars.githubusercontent.com/u/148605?v=4)](https://github.com/EricHogue "EricHogue (1 commits)")[![vsychov](https://avatars.githubusercontent.com/u/2186303?v=4)](https://github.com/vsychov "vsychov (1 commits)")[![danschultzer](https://avatars.githubusercontent.com/u/1254724?v=4)](https://github.com/danschultzer "danschultzer (1 commits)")

---

Tags

databasemigrationsdbdatabase migrationsphinx

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gtunes-phinx/health.svg)

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

###  Alternatives

[robmorgan/phinx

Phinx makes it ridiculously easy to manage the database migrations for your PHP app.

4.5k48.7M443](/packages/robmorgan-phinx)[perplorm/perpl

Perpl is an improved and still maintained fork of Propel2, an open-source Object-Relational Mapping (ORM) for PHP.

249.4k](/packages/perplorm-perpl)

PHPackages © 2026

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