12 use Symfony\Component\Console\Input\InputInterface;
13 use Symfony\Component\Console\Input\InputOption;
14 use Symfony\Component\Console\Output\OutputInterface;
26 private $installFactory;
33 private $deploymentConfig;
43 $this->installFactory = $installFactory;
45 parent::__construct();
56 ->setName(
'setup:db-schema:upgrade')
62 InputOption::VALUE_OPTIONAL,
63 'Allows to convert old scripts (InstallSchema, UpgradeSchema) to db_schema.xml format',
68 ->setDescription(
'Installs and upgrades the DB schema');
77 if (!$this->deploymentConfig->isAvailable()) {
78 $output->writeln(
"<info>No information is available: the Magento application is not installed.</info>");
80 return \Magento\Framework\Console\Cli::RETURN_FAILURE;
83 $installer->installSchema($input->getOptions());
84 return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
__construct(InstallerFactory $installFactory, DeploymentConfig $deploymentConfig)
const CONVERT_OLD_SCRIPTS_KEY
execute(InputInterface $input, OutputInterface $output)