protected function reconcileDatabaseSchema(InputInterface $input, OutputInterface $output)
    {
        if ($this->isDbSetup === false) {
            return true;
        }
        $this->step(++$this->step, 'Checking Database Schema');
        $command = $this->getApplication()->find('database:check');
        $buffer = $this->getBufferedOutput($output, OutputInterface::VERBOSITY_QUIET);
        $subInput = new ArrayInput([
            '--no-interaction' => true,
        ]);

        $result = $command->run($subInput, $buffer);
        $this->writeBufferedOutput($buffer, $result);
        if ($result === 0) {
            return true;
        }

        $this->step(++$this->step, 'Updating Database Schema');
        $command = $this->getApplication()->find('database:update');
        $subInput = new ArrayInput([]);
        $subInput->setInteractive(!$input->isInteractive());

        $result = $command->run($subInput, $output);

        return $result === 0;
    }
protected function reconcileDatabaseSchema(InputInterface $input, OutputInterface $output)
    {
        if ($this->isDbSetup === false) {
            return true;
        }
        $this->step(++$this->step, 'Checking Database Schema');
        $command = $this->getApplication()->find('database:check');
        $buffer = $this->getBufferedOutput($output, OutputInterface::VERBOSITY_QUIET);
        $subInput = new ArrayInput([
            '--no-interaction' => true,
        ]);

        $result = $command->run($subInput, $buffer);
        $this->writeBufferedOutput($buffer, $result);
        if ($result === 0) {
            return true;
        }

        $this->step(++$this->step, 'Updating Database Schema');
        $command = $this->getApplication()->find('database:update');
        $subInput = new ArrayInput([]);
        $subInput->setInteractive(!$input->isInteractive());

        $result = $command->run($subInput, $output);

        return $result === 0;
    }
protected function reconcileDatabaseSchema ( InputInterface $ input , OutputInterface $ output ) { if ( $ this -> isDbSetup === false ) { return true ; } $ this -> step ( ++ $ this -> step , 'Checking Database Schema' ) ; $ command = $ this -> getApplication ( ) -> find ( 'database:check' ) ; $ buffer = $ this -> getBufferedOutput ( $ output , OutputInterface :: VERBOSITY_QUIET ) ; $ subInput = new ArrayInput ( [ '--no-interaction' => true , ] ) ; $ result = $ command -> run ( $ subInput , $ buffer ) ; $ this -> writeBufferedOutput ( $ buffer , $ result ) ; if ( $ result === 0 ) { return true ; } $ this -> step ( ++ $ this -> step , 'Updating Database Schema' ) ; $ command = $ this -> getApplication ( ) -> find ( 'database:update' ) ; $ subInput = new ArrayInput ( [ ] ) ; $ subInput -> setInteractive ( ! $ input -> isInteractive ( ) ) ; $ result = $ command -> run ( $ subInput , $ output ) ; return $ result === 0 ; }
Check the database schema exists is consistent with the configuration.

@param InputInterface  $input
@param OutputInterface $output

@return bool
Check the database schema exists is consistent with the configuration .