Get a merged array of tables.
public getSchemaTables ( ) : Doctrine\DBAL\Schema\Table[] | ||
return | Doctrine\DBAL\Schema\Table[] |
/** * Setup some short aliases so non prefixed keys can be used to get metadata */ public function initializeShortAliases() { foreach ($this->schemaManager->getSchemaTables() as $table) { if ($tableName = $table->getName()) { $this->aliases[$table->getOption('alias')] = $tableName; } } }
/** * Setup some short aliases so non prefixed keys can be used to get metadata */ public function initializeShortAliases() { foreach ($this->schemaManager->getSchemaTables() as $table) { if ($tableName = $table->getName()) { $mainAlias = $this->getContentTypeFromAlias($table->getOption('alias')); $this->aliases[$mainAlias] = $tableName; $slugAlias = $this->getContentTypeFromAlias($table->getOption('alias'), true); if ($mainAlias !== $slugAlias) { $this->aliases[$slugAlias] = $tableName; } } } }
/** * Run the checks on the tables to see if they firstly exist, then if they * require update. */ protected function checkTables() { $fromTables = $this->manager->getInstalledTables(); $toTables = $this->manager->getSchemaTables(); /** @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); } }