Phinx is a database migration tool for PHP applications. A database migration is a versioned script that describes a structural change to your database, such as adding a table, renaming a column, or removing an index. Instead of writing raw SQL and running it by hand each time a schema changes, you write migration files in PHP and let Phinx track which ones have been applied. When you deploy to a new server or share the project with a teammate, Phinx can run the pending migrations automatically to bring the database up to date. Migrations in Phinx can be applied forward or reversed. Applying them forward updates the database to a newer structure, reversing them rolls a change back if something goes wrong. The tool also supports seeding, which means loading initial data into a database after it is first set up. Because migrations are ordinary files in your codebase, they work naturally with source control: you can branch, merge, and review database changes the same way you handle code. Phinx works with four databases out of the box: MySQL, PostgreSQL, SQLite, and Microsoft SQL Server. It is installed via Composer, the standard package manager for PHP, and is designed to integrate with any PHP application, not just CakePHP projects (though it lives under the CakePHP GitHub organization). Comprehensive documentation is available at book.cakephp.org/phinx. One noted limitation: the PostgreSQL adapter cannot currently set unique constraints on a table. The project is licensed under the MIT license.
← cakephp on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.