示例#1
0
文件: Schema.php 项目: ncud/sagalaya
 /**
  * @param Table $table
  */
 protected function _addTable(Table $table)
 {
     $tableName = strtolower($table->getName());
     if (isset($this->_tables[$tableName])) {
         throw SchemaException::tableAlreadyExists($tableName);
     }
     $this->_tables[$tableName] = $table;
     $table->setSchemaConfig($this->_schemaConfig);
 }
示例#2
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);
 }