src/Phinx/Wrapper/TextWrapper.php
public function getMigrate($env = null, $target = null)
    {
        $command = ['migrate'];
        if ($env ?: $this->hasOption('environment')) {
            $command += ['-e' => $env ?: $this->getOption('environment')];
        }
        if ($this->hasOption('configuration')) {
            $command += ['-c' => $this->getOption('configuration')];
        }
        if ($this->hasOption('parser')) {
            $command += ['-p' => $this->getOption('parser')];
        }
        if ($target) {
            $command += ['-t' => $target];
        }

        return $this->executeRun($command);
    }
public function getMigrate($env = null, $target = null)
    {
        $command = ['migrate'];
        if ($env ?: $this->hasOption('environment')) {
            $command += ['-e' => $env ?: $this->getOption('environment')];
        }
        if ($this->hasOption('configuration')) {
            $command += ['-c' => $this->getOption('configuration')];
        }
        if ($this->hasOption('parser')) {
            $command += ['-p' => $this->getOption('parser')];
        }
        if ($target) {
            $command += ['-t' => $target];
        }

        return $this->executeRun($command);
    }
public function getMigrate ( $ env = null , $ target = null ) { $ command = [ 'migrate' ] ; if ( $ env ? : $ this -> hasOption ( 'environment' ) ) { $ command += [ '-e' => $ env ? : $ this -> getOption ( 'environment' ) ] ; } if ( $ this -> hasOption ( 'configuration' ) ) { $ command += [ '-c' => $ this -> getOption ( 'configuration' ) ] ; } if ( $ this -> hasOption ( 'parser' ) ) { $ command += [ '-p' => $ this -> getOption ( 'parser' ) ] ; } if ( $ target ) { $ command += [ '-t' => $ target ] ; } return $ this -> executeRun ( $ command ) ; }
Returns the output from running the "migrate" command.
@param  string $env environment name (optional)
@param  string $target target version (optional)
@return string
Returns the output from running the migrate command .