Ejemplo n.º 1
0
 /**
  * @param \Doctrine\DBAL\Schema\Sequence $sequence
  *
  * @return void
  *
  * @throws \Doctrine\DBAL\Schema\SchemaException
  */
 protected function _addSequence(Sequence $sequence)
 {
     $namespaceName = $sequence->getNamespaceName();
     $seqName = $sequence->getFullQualifiedName($this->getName());
     if (isset($this->_sequences[$seqName])) {
         throw SchemaException::sequenceAlreadyExists($seqName);
     }
     if (!$sequence->isInDefaultNamespace($this->getName()) && !$this->hasNamespace($namespaceName)) {
         $this->createNamespace($namespaceName);
     }
     $this->_sequences[$seqName] = $sequence;
 }