Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function dropForeign(AbstractTable $table, AbstractReference $foreign)
 {
     $this->run("ALTER TABLE {$table->getName(true)} DROP FOREIGN KEY {$foreign->getName(true)}");
     return $this;
 }
Пример #2
0
 /**
  * Driver specific foreign key remove (drop) command.
  *
  * @param AbstractTable     $table
  * @param AbstractReference $foreign
  * @return self
  */
 public function dropForeign(AbstractTable $table, AbstractReference $foreign)
 {
     return $this->dropConstrain($table, $foreign->getName());
 }
Пример #3
0
 /**
  * {@inheritdoc}
  */
 protected function doForeignDrop(AbstractReference $foreign)
 {
     $this->driver->statement("ALTER TABLE {$this->getName(true)} DROP FOREIGN KEY {$foreign->getName(true)}");
 }
Пример #4
0
 /**
  * Register new foreign key element.
  *
  * @param AbstractReference $foreign
  * @return AbstractReference
  */
 protected function registerReference(AbstractReference $foreign)
 {
     $this->foreigns[$foreign->getName()] = $foreign;
     return $foreign;
 }