alexbuyanow / zfphinx
Zend Framework 3 module that provides integration of Phinx library
Installs: 2 177
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- php: ^5.6 || ^7.0
- robmorgan/phinx: ~0.9
- zendframework/zend-console: >=2.6
- zendframework/zend-db: >=2.8
- zendframework/zend-modulemanager: >=2.7
- zendframework/zend-mvc: ~3.
- zendframework/zend-mvc-console: ~1
- zendframework/zend-servicemanager: ~3.
Requires (Dev)
- phpunit/phpunit: 5.*
This package is auto-updated.
Last update: 2024-12-28 05:38:25 UTC
README
ZF3 module, integrated Phinx
Phinx is easy database migration manager
Dependencies
Installation
- 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',
Configuration
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>',
],
],
],
Usage
Basic usage via console (from your project root)
php public/index.php zfphinx <command> <flags>
List of available commands
php public/index.php zfphinx