Cml\Console\Commands\Migrate\Migrate::execute PHP Method

execute() public method

运行迁移
public execute ( array $args, array $options = [] ) : integer
$args array 参数
$options array 选项
return integer
    public function execute(array $args, array $options = [])
    {
        $this->bootstrap($args, $options);
        $version = isset($options['target']) ? $options['target'] : $options['t'];
        $date = isset($options['date']) ? $options['date'] : $options['d'];
        // run the migrations
        $start = microtime(true);
        if (null !== $date) {
            $this->getManager()->migrateToDateTime(new \DateTime($date));
        } else {
            $this->getManager()->migrate($version);
        }
        $end = microtime(true);
        Output::writeln('');
        Output::writeln(Colour::colour('All Done. Took ' . sprintf('%.4fs', $end - $start), Colour::CYAN));
        return 0;
    }
Migrate