private function checksSectionTable()
    {
        $qb = $this->repo->createQueryBuilder('s');
        $this->output->write(' - BackBee database version:  - ');
        try {
            $qb->where('s._has_children = :true')
                ->orWhere('s._has_children = :false')
                ->setMaxResults(1)
                ->setParameters([':true' => true, ':false' => false])
                ->getQuery()
                ->execute();
        } catch (\Exception $e) {
            $this->output->writeln("<error>Failed</error>");
            throw new BBException('Please run "backbee bbapp:update" before this command');
        }
        $this->output->writeln('<info>OK</info>');

        return $this;
    }
private function checksSectionTable()
    {
        $qb = $this->repo->createQueryBuilder('s');
        $this->output->write(' - BackBee database version:  - ');
        try {
            $qb->where('s._has_children = :true')
                ->orWhere('s._has_children = :false')
                ->setMaxResults(1)
                ->setParameters([':true' => true, ':false' => false])
                ->getQuery()
                ->execute();
        } catch (\Exception $e) {
            $this->output->writeln("<error>Failed</error>");
            throw new BBException('Please run "backbee bbapp:update" before this command');
        }
        $this->output->writeln('<info>OK</info>');

        return $this;
    }
private function checksSectionTable ( ) { $ qb = $ this -> repo -> createQueryBuilder ( 's' ) ; $ this -> output -> write ( ' - BackBee database version:  - ' ) ; try { $ qb -> where ( 's._has_children = :true' ) -> orWhere ( 's._has_children = :false' ) -> setMaxResults ( 1 ) -> setParameters ( [ ':true' => true , ':false' => false ] ) -> getQuery ( ) -> execute ( ) ; } catch ( \ Exception $ e ) { $ this -> output -> writeln ( "<error>Failed</error>" ) ; throw new BBException ( 'Please run "backbee bbapp:update" before this command' ) ; } $ this -> output -> writeln ( '<info>OK</info>' ) ; return $ this ; }
Checks for existing `has_children` attribut in table `section`, throw exception if `has_children` doesn't exists

@return \BackBee\Console\Command\UpgradeToPageSectionCommand
@throws BBException  Raises if `has_children` doesn't exists
Checks for existing has_children attribut in table section throw exception if has_children doesn t exists