芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/midiatech/vendor/robmorgan/phinx/src/Phinx/Console/Command/Status.php
addOption('--environment', '-e', InputOption::VALUE_REQUIRED, 'The target environment.'); $this->setName('status') ->setDescription('Show migration status') ->addOption('--format', '-f', InputOption::VALUE_REQUIRED, 'The output format: text or json. Defaults to text.') ->setHelp( <<
status command prints a list of all migrations, along with their current status
phinx status -e development
phinx status -e development -f json
The
version_order
configuration option is used to determine the order of the status migrations. EOT ); } /** * Show the migration status. * * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output * @return int 0 if all migrations are up, or an error code */ protected function execute(InputInterface $input, OutputInterface $output) { $this->bootstrap($input, $output); $environment = $input->getOption('environment'); $format = $input->getOption('format'); if ($environment === null) { $environment = $this->getConfig()->getDefaultEnvironment(); $output->writeln('
warning
no environment specified, defaulting to: ' . $environment); } else { $output->writeln('
using environment
' . $environment); } if ($format !== null) { $output->writeln('
using format
' . $format); } $output->writeln('
ordering by
' . $this->getConfig()->getVersionOrder() . " time"); // print the status return $this->getManager()->printStatus($environment, $format); } }