robertboloc/robo-phinx
最新稳定版本:1.2.0
Composer 安装命令:
composer require robertboloc/robo-phinx
包简介
Phinx integration with Robo task runner
README 文档
README
Integrates Phinx tool with the Robo task runner.
Table of contents
Installation
Add "robertboloc/robo-phinx": "^1.2" to your composer.json.
{
"require": {
"robertboloc/robo-phinx": "^1.2"
}
}
Execute composer update
Usage
Use the Phinx trait in your RoboFile.php
<?php class Robofile extends \Robo\Tasks { use \Rb\Robo\Task\Phinx; //... }
Build your tasks using the Phinx commands:
Init
<?php $this->taskPhinx() ->init($path = '.') ->run();
Create
<?php $this->taskPhinx() ->create($migration) ->run();
Migrate
<?php $this->taskPhinx() ->migrate($target = null) ->run();
Rollback
<?php $this->taskPhinx() ->rollback($target = null) ->run();
Status
<?php $this->taskPhinx() ->status() ->run();
Configuration
You can apply configuration parameters to all the commands using the configuration modifiers:
Config
<?php $this->taskPhinx() ->config($file = 'phinx.yml') ->status() ->run();
Parser
<?php $this->taskPhinx() ->parser($format = 'yaml') ->status() ->run();
Environment
<?php $this->taskPhinx() ->environment($environment = 'development') ->status() ->run();
Note that all the commands have their default arguments in parenthesis. If no argument is specified the command takes no argument.
统计信息
- 总下载量: 44.4k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-12-27