robmorgan / phinx
Phinx makes it ridiculously easy to manage the database migrations for your PHP app.
Installs: 36 586 771
Dependents: 488
Suggesters: 20
Security: 0
Stars: 4 472
Watchers: 138
Forks: 891
Open Issues: 146
Requires
- php-64bit: >=8.1
- composer-runtime-api: ^2.0
- cakephp/database: ^5.0.2
- 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
- 0.x-dev
- 0.16.6
- 0.16.5
- 0.16.4
- 0.16.3
- 0.16.2
- 0.16.1
- 0.16.0
- 0.15.5
- 0.15.4
- 0.15.3
- 0.15.2
- 0.15.1
- 0.15.0
- 0.14.0
- 0.13.4
- 0.13.3
- 0.13.2
- 0.13.1
- 0.13.0
- 0.12.13
- 0.12.12
- 0.12.11
- 0.12.10
- 0.12.9
- 0.12.8
- 0.12.7
- 0.12.6
- 0.12.5
- 0.12.4
- 0.12.3
- 0.12.2
- 0.12.1
- 0.12.0
- 0.11.7
- 0.11.6
- 0.11.5
- 0.11.4
- 0.11.3
- 0.11.1
- 0.10.8
- 0.10.7
- 0.10.6
- 0.10.5
- 0.10.3
- 0.10.2
- 0.10.1
- 0.10.0
- 0.9.2
- v0.9.1
- v0.9.0
- v0.8.1
- v0.8.0
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.6
- v0.6.5
- v0.6.4
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.5
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.6
- v0.4.5
- v0.4.4
- v0.4.3
- v0.4.2.1
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.8
- v0.3.7
- v0.3.6
- v0.3.5
- v0.3.4
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.9
- v0.2.8
- v0.2.7
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- dev-improve-create-tests-v2
This package is auto-updated.
Last update: 2024-12-21 00:31:53 UTC
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
See version and branch overview for branch and PHP compatibility.
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 robmorgan/phinx
-
Install Phinx:
php composer.phar install
-
Execute Phinx:
php vendor/bin/phinx
As a Phar
You can also use the Box application to build Phinx as a Phar archive (https://box-project.github.io/box2/).
-
Clone Phinx from GitHub
git clone https://github.com/cakephp/phinx.git cd phinx
-
Install Composer
curl -s https://getcomposer.org/installer | php
-
Install the Phinx dependencies
php composer.phar install
-
Install Box:
curl -LSs https://box-project.github.io/box2/installer.php | php
-
Create a Phar archive
php box.phar build
Documentation
Check out https://book.cakephp.org/phinx for the comprehensive documentation.
Other translations include:
Contributing
Please read the CONTRIBUTING document.
News & Updates
Follow @CakePHP on Twitter to stay up to date.
Limitations
PostgreSQL
- Not able to set a unique constraint on a table (#1026).
Misc
Version History
Please read the release notes.
License
(The MIT license)
Copyright (c) 2017 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.