typrint / phinx
Phinx makes it ridiculously easy to manage the database migrations for your PHP app.
Requires
- php-64bit: >=8.1
- composer-runtime-api: ^2.0
- psr/container: ^1.1|^2.0
- symfony/config: ^3.4|^4.0|^5.0|^6.0|^7.0
- symfony/console: ^6.0|^7.0
Requires (Dev)
- ext-json: *
- ext-pdo: *
- cakephp/cakephp: ^5.0.2
- cakephp/cakephp-codesniffer: ^5.0
- phpunit/phpunit: ^9.5.19
- symfony/yaml: ^3.4|^4.0|^5.0|^6.0|^7.0
Suggests
- ext-json: Install if using JSON configuration format
- ext-pdo: PDO extension is needed
- symfony/yaml: Install if using YAML configuration format
README
Intro
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 book.cakephp.org/phinx for the comprehensive documentation.
Features
- Write database migrations using database agnostic PHP code.
- Migrate up and down.
- Migrate on deployment.
- Seed data after database creation.
- Get going in less than 5 minutes.
- Stop worrying about the state of your database.
- Take advantage of SCM features such as branching.
- Integrate with any app.
Supported Adapters
Phinx natively supports the following database adapters:
- MySQL
- PostgreSQL
- SQLite
- Microsoft SQL Server
Install & Run
Composer
The fastest way to install Phinx is to add it to your project using Composer (https://getcomposer.org/).
-
Install Composer:
curl -sS https://getcomposer.org/installer | php
-
Require Phinx as a dependency using Composer:
php composer.phar require typrint/phinx
Documentation
Check out https://book.cakephp.org/phinx for the comprehensive documentation.
Other translations include:
Limitations
PostgreSQL
- Not able to set a unique constraint on a table (cakephp#1026).
Misc
Version History
Please read the release notes.
License
MIT