Database migrations for PHP apps, without an ORM or framework
open sourceMITfree
Phinx is a database migration tool for PHP: you write migrations in database-agnostic PHP, migrate up and down, run them on deployment and seed data, without the weight of an ORM or framework, so it fits any app. It supports MySQL, PostgreSQL, SQLite and Microsoft SQL Server, and is maintained under the CakePHP organisation.
Problems it solves
- manage database schema migrations in a PHP app without a framework
- version the database schema of a PHP project
- seed a database for development in PHP
Features
- database-agnostic migrations in PHP
- migrate up and down
- seed data
- MySQL, PostgreSQL, SQLite and SQL Server adapters
- works with any PHP app
Alternatives
The same job
These do what Phinx does.
- Atlas Database schema as code: plan, lint, test and apply schema migrations, like Terraform for databases
- Reshape An easy-to-use, zero-downtime schema migration tool for Postgres
- sqldef Idempotent schema management in plain SQL for MySQL, PostgreSQL, SQLite and SQL Server
- pgroll Zero-downtime, reversible schema migrations for Postgres
- Liquibase Track, version, deploy and roll back database schema changes across 70+ databases
