protected function checkTables($fromTables, $toTables)
    {
        /** @var $fromTable Table */
        foreach ($toTables as $toTableAlias => $toTable) {
            $tableName = $toTable->getName();

            if (!isset($fromTables[$toTableAlias])) {
                // Table doesn't exist. Mark it for pending creation.
                $this->pending = true;
                $this->tablesCreate[$tableName] = $toTable;
                $this->getResponse()->addTitle($tableName, sprintf('Table `%s` is not present.', $tableName));
                $this->systemLog->debug('Database table missing: ' . $tableName);
                continue;
            }

            // Table exists. Check for required updates.
            $fromTable = $fromTables[$toTableAlias];
            $this->checkTable($fromTable, $toTable);
        }
    }
protected function checkTables($fromTables, $toTables)
    {
        /** @var $fromTable Table */
        foreach ($toTables as $toTableAlias => $toTable) {
            $tableName = $toTable->getName();

            if (!isset($fromTables[$toTableAlias])) {
                // Table doesn't exist. Mark it for pending creation.
                $this->pending = true;
                $this->tablesCreate[$tableName] = $toTable;
                $this->getResponse()->addTitle($tableName, sprintf('Table `%s` is not present.', $tableName));
                $this->systemLog->debug('Database table missing: ' . $tableName);
                continue;
            }

            // Table exists. Check for required updates.
            $fromTable = $fromTables[$toTableAlias];
            $this->checkTable($fromTable, $toTable);
        }
    }
protected function checkTables ( $ fromTables , $ toTables ) { /** @var $fromTable Table */ foreach ( $ toTables as $ toTableAlias => $ toTable ) { $ tableName = $ toTable -> getName ( ) ; if ( ! isset ( $ fromTables [ $ toTableAlias ] ) ) { // Table doesn't exist. Mark it for pending creation. $ this -> pending = true ; $ this -> tablesCreate [ $ tableName ] = $ toTable ; $ this -> getResponse ( ) -> addTitle ( $ tableName , sprintf ( 'Table `%s` is not present.' , $ tableName ) ) ; $ this -> systemLog -> debug ( 'Database table missing: ' . $ tableName ) ; continue ; } // Table exists. Check for required updates. $ fromTable = $ fromTables [ $ toTableAlias ] ; $ this -> checkTable ( $ fromTable , $ toTable ) ; } }
Run the checks on the tables to see if they firstly exist, then if they
require update.

@param Table[] $fromTables
@param Table[] $toTables
Run the checks on the tables to see if they firstly exist then if they require update .