ZF3 module, integrated Phinx
Phinx is easy database migration manager
- Install Composer:
curl -sS https://getcomposer.org/installer | php
- Require ZfPhinx as a dependency using Composer:
php composer.phar require alexbuyanow/zfphinx
- Install Phinx:
php composer.phar install
- Open my/project/directory/configs/application.config.php and add the following key to your modules:
'ZfPhinx',
Configure 'zfphinx' section in your application config
'zfphinx' => [
'paths' => [
'migrations' => '<path to your migration directory>',
'seeds' => '<path to your seed directory>',
],
'environments' => [
'default_migration_table' => '<DB table for migrations journal. Default is phinxlog>',
'default_database' => '<Unnecessary default environment key>',
'<environment key 1>' => [
'db_adapter' => '<DB adapter name from service locator>',
],
...
'<environment key n>' => [
'db_adapter' => '<DB adapter name from service locator>',
],
],
],
Basic usage via console (from your project root)
php public/index.php zfphinx <command> <flags>
List of available commands
php public/index.php zfphinx