承接 robertboloc/robo-phinx 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

robertboloc/robo-phinx

最新稳定版本:1.2.0

Composer 安装命令:

composer require robertboloc/robo-phinx

包简介

Phinx integration with Robo task runner

README 文档

README

Build Status Packagist License

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

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-27