lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php
public function createForeignKey(ForeignKeyConstraint $foreignKey, $table)
    {
        $this->_execSql($this->_platform->getCreateForeignKeySQL($foreignKey, $table));
    }
public function createForeignKey(ForeignKeyConstraint $foreignKey, $table)
    {
        $this->_execSql($this->_platform->getCreateForeignKeySQL($foreignKey, $table));
    }
public function createForeignKey ( ForeignKeyConstraint $ foreignKey , $ table ) { $ this -> _execSql ( $ this -> _platform -> getCreateForeignKeySQL ( $ foreignKey , $ table ) ) ; }
Creates a new foreign key.

@param ForeignKeyConstraint $foreignKey The ForeignKey instance.
@param Table|string         $table      The name of the table on which the foreign key is to be created.

@return void
Creates a new foreign key .