/** * Driver specific foreign key adding command. * * @param AbstractReference $foreign */ protected function doForeignAdd(AbstractReference $foreign) { $this->driver->statement("ALTER TABLE {$this->getName(true)} ADD {$foreign->sqlStatement()}"); }
/** * Driver specific foreign key adding command. * * @param AbstractTable $table * @param AbstractReference $foreign * @return self */ public function addForeign(AbstractTable $table, AbstractReference $foreign) { $this->run("ALTER TABLE {$table->getName(true)} ADD {$foreign->sqlStatement()}"); return $this; }