/var/www/vhosts/ihelp.ro/httpdocs/vendor/robmorgan/phinx/src/Phinx/Db/Action
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/robmorgan/phinx/src/Phinx/Db/Action/DropForeignKey.php (1744B)
foreignKey = $foreignKey;
}
/**
* Creates a new DropForeignKey object after building the ForeignKey
* definition out of the passed arguments.
*
* @param \Phinx\Db\Table\Table $table The table to delete the foreign key from
* @param string|string[] $columns The columns participating in the foreign key
* @param string|null $constraint The constraint name
* @return static
*/
public static function build(Table $table, $columns, ?string $constraint = null)
{
if (is_string($columns)) {
$columns = [$columns];
}
$foreignKey = new ForeignKey();
$foreignKey->setColumns($columns);
if ($constraint) {
$foreignKey->setConstraint($constraint);
}
return new static($table, $foreignKey);
}
/**
* Returns the foreign key to remove
*
* @return \Phinx\Db\Table\ForeignKey
*/
public function getForeignKey(): ForeignKey
{
return $this->foreignKey;
}
}