lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
public function getCreateForeignKeySQL(ForeignKeyConstraint $foreignKey, $table)
    {
        if ($table instanceof Table) {
            $table = $table->getQuotedName($this);
        }

        return 'ALTER TABLE ' . $table . ' ADD ' . $this->getForeignKeyDeclarationSQL($foreignKey);
    }
public function getCreateForeignKeySQL(ForeignKeyConstraint $foreignKey, $table)
    {
        if ($table instanceof Table) {
            $table = $table->getQuotedName($this);
        }

        return 'ALTER TABLE ' . $table . ' ADD ' . $this->getForeignKeyDeclarationSQL($foreignKey);
    }
public function getCreateForeignKeySQL ( ForeignKeyConstraint $ foreignKey , $ table ) { if ( $ table instanceof Table ) { $ table = $ table -> getQuotedName ( $ this ) ; } return 'ALTER TABLE ' . $ table . ' ADD ' . $ this -> getForeignKeyDeclarationSQL ( $ foreignKey ) ; }
Returns the SQL to create a new foreign key.

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

@return string
Returns the SQL to create a new foreign key .