Example #1
0
 /**
  * @param \Doctrine\DBAL\Schema\Table $table
  *
  * @return void
  *
  * @throws \Doctrine\DBAL\Schema\SchemaException
  */
 protected function _addTable(Table $table)
 {
     $namespaceName = $table->getNamespaceName();
     $tableName = $table->getFullQualifiedName($this->getName());
     if (isset($this->_tables[$tableName])) {
         throw SchemaException::tableAlreadyExists($tableName);
     }
     if (!$table->isInDefaultNamespace($this->getName()) && !$this->hasNamespace($namespaceName)) {
         $this->createNamespace($namespaceName);
     }
     $this->_tables[$tableName] = $table;
     $table->setSchemaConfig($this->_schemaConfig);
 }
 /**
  * {@inheritdoc}
  */
 public function acceptTable(Table $table)
 {
     if (!$table->isInDefaultNamespace($this->schema->getName())) {
         $this->schema->dropTable($table->getName());
     }
 }