lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php
public function dropAndCreateForeignKey(ForeignKeyConstraint $foreignKey, $table)
    {
        $this->tryMethod('dropForeignKey', $foreignKey, $table);
        $this->createForeignKey($foreignKey, $table);
    }
public function dropAndCreateForeignKey(ForeignKeyConstraint $foreignKey, $table)
    {
        $this->tryMethod('dropForeignKey', $foreignKey, $table);
        $this->createForeignKey($foreignKey, $table);
    }
public function dropAndCreateForeignKey ( ForeignKeyConstraint $ foreignKey , $ table ) { $ this -> tryMethod ( 'dropForeignKey' , $ foreignKey , $ table ) ; $ this -> createForeignKey ( $ foreignKey , $ table ) ; }
Drops and creates a new foreign key.

@param ForeignKeyConstraint $foreignKey An associative array that defines properties of the foreign key to be created.
@param Table|string         $table      The name of the table on which the foreign key is to be created.

@return void
Drops and creates a new foreign key .