https://github.com/robertmarsal/robo-phinx
Phinx integration with Robo task runner
https://github.com/robertmarsal/robo-phinx
phinx robo
Last synced: 6 months ago
JSON representation
Phinx integration with Robo task runner
- Host: GitHub
- URL: https://github.com/robertmarsal/robo-phinx
- Owner: robertmarsal
- License: mit
- Created: 2014-12-27T19:26:38.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-06-14T19:59:45.000Z (about 8 years ago)
- Last Synced: 2024-08-10T11:18:13.959Z (almost 2 years ago)
- Topics: phinx, robo
- Language: PHP
- Size: 13.7 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Robo Phinx Extension
[](https://travis-ci.org/robertboloc/robo-phinx)
[](https://packagist.org/packages/robertboloc/robo-phinx)
[](https://github.com/robertboloc/robo-phinx/blob/master/LICENSE.md)
Integrates Phinx tool with the [Robo](http://robo.li/) task runner.
## Table of contents
- [Installation](#installation)
- [Usage](#usage)
- [Configuration](#configuration)
## Installation
Add `"robertboloc/robo-phinx": "^1.2"` to your composer.json.
```json
{
"require": {
"robertboloc/robo-phinx": "^1.2"
}
}
```
Execute `composer update`
## Usage
Use the `Phinx` trait in your `RoboFile.php`
```php
taskPhinx()
->init($path = '.')
->run();
```
### Create
```php
taskPhinx()
->create($migration)
->run();
```
### Migrate
```php
taskPhinx()
->migrate($target = null)
->run();
```
### Rollback
```php
taskPhinx()
->rollback($target = null)
->run();
```
### Status
```php
taskPhinx()
->status()
->run();
```
## Configuration
You can apply configuration parameters to all the commands using the configuration modifiers:
### Config
```php
taskPhinx()
->config($file = 'phinx.yml')
->status()
->run();
```
### Parser
```php
taskPhinx()
->parser($format = 'yaml')
->status()
->run();
```
### Environment
```php
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.