Track and apply database schema changes (add tables, rename columns) as versioned PHP files that live alongside your code in version control.
Automatically apply pending migrations when deploying to a new server so the database stays in sync without running raw SQL by hand.
Seed a fresh database with initial or test data using Phinx's built-in seeder feature after running migrations.
Roll back a failed database schema change by running a Phinx migration in reverse without touching raw SQL.
| cakephp/phinx | easychen/stack-roadmap | tecnickcom/tcpdf | |
|---|---|---|---|
| Stars | 4,532 | 4,541 | 4,546 |
| Language | PHP | PHP | PHP |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 1/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Install via Composer, requires an existing supported database (MySQL, PostgreSQL, SQLite, or SQL Server) and PHP already configured.
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.
A standalone PHP tool for managing database schema changes as versioned migration files, supporting MySQL, PostgreSQL, SQLite, and SQL Server, usable with any PHP project, not just CakePHP.
Mainly PHP. The stack also includes PHP, Composer, MySQL.
Use freely for any purpose including commercial projects, as long as you include the MIT copyright notice.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.