public function getAddForeignKeyDDL(ForeignKey $fk)
    {
        if ($fk->isSkipSql() || $fk->isPolymorphic()) {
            return;
        }
        $pattern = "
ALTER TABLE %s ADD %s;
";

        return sprintf($pattern,
            $this->quoteIdentifier($fk->getTable()->getName()),
            $this->getForeignKeyDDL($fk)
        );
    }
public function getAddForeignKeyDDL(ForeignKey $fk)
    {
        if ($fk->isSkipSql() || $fk->isPolymorphic()) {
            return;
        }
        $pattern = "
ALTER TABLE %s ADD %s;
";

        return sprintf($pattern,
            $this->quoteIdentifier($fk->getTable()->getName()),
            $this->getForeignKeyDDL($fk)
        );
    }
public function getAddForeignKeyDDL ( ForeignKey $ fk ) { if ( $ fk -> isSkipSql ( ) || $ fk -> isPolymorphic ( ) ) { return ; } $ pattern = "
ALTER TABLE %s ADD %s;
" ; return sprintf ( $ pattern , $ this -> quoteIdentifier ( $ fk -> getTable ( ) -> getName ( ) ) , $ this -> getForeignKeyDDL ( $ fk ) ) ; }
Builds the DDL SQL to add a foreign key.

@param  ForeignKey $fk
@return string
Builds the DDL SQL to add a foreign key .