private function checkBeforeUpdate()
    {
        if (0 <= version_compare(BBApplication::VERSION, '1.1')) {
            $schemaManager = $this->em->getConnection()->getSchemaManager();
            $pageName = $this->em->getClassMetadata('BackBee\NestedNode\Page')->getTableName();
            $sectionName = $this->em->getClassMetadata('BackBee\NestedNode\Section')->getTableName();

            if (false === $schemaManager->tablesExist($sectionName) && true === $schemaManager->tablesExist($pageName)) {
                throw new BBException(sprintf('Table `%s` does not exist. Perhaps you should launch bbapp:upgradeToPageSection command before.', $sectionName));
            }
        }
    }
private function checkBeforeUpdate()
    {
        if (0 <= version_compare(BBApplication::VERSION, '1.1')) {
            $schemaManager = $this->em->getConnection()->getSchemaManager();
            $pageName = $this->em->getClassMetadata('BackBee\NestedNode\Page')->getTableName();
            $sectionName = $this->em->getClassMetadata('BackBee\NestedNode\Section')->getTableName();

            if (false === $schemaManager->tablesExist($sectionName) && true === $schemaManager->tablesExist($pageName)) {
                throw new BBException(sprintf('Table `%s` does not exist. Perhaps you should launch bbapp:upgradeToPageSection command before.', $sectionName));
            }
        }
    }
private function checkBeforeUpdate ( ) { if ( 0 <= version_compare ( BBApplication :: VERSION , '1.1' ) ) { $ schemaManager = $ this -> em -> getConnection ( ) -> getSchemaManager ( ) ; $ pageName = $ this -> em -> getClassMetadata ( 'BackBee\NestedNode\Page' ) -> getTableName ( ) ; $ sectionName = $ this -> em -> getClassMetadata ( 'BackBee\NestedNode\Section' ) -> getTableName ( ) ; if ( false === $ schemaManager -> tablesExist ( $ sectionName ) && true === $ schemaManager -> tablesExist ( $ pageName ) ) { throw new BBException ( sprintf ( 'Table `%s` does not exist. Perhaps you should launch bbapp:upgradeToPageSection command before.' , $ sectionName ) ) ; } } }
Checks the db if section feature is already available for version > 1.1
@throws \BBException                 Raises if section features is not available
Checks the db if section feature is already available for version > 1 . 1