Cleaning up foreign key support. Added drop_foreign command.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
This commit is contained in:
@@ -207,6 +207,17 @@ class Table {
|
||||
return $this->drop_key(__FUNCTION__, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop a foreign key constraint from the table.
|
||||
*
|
||||
* @param string $name
|
||||
* @return void
|
||||
*/
|
||||
public function drop_foreign($name)
|
||||
{
|
||||
return $this->drop_key(__FUNCTION__, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a command to drop any type of index.
|
||||
*
|
||||
@@ -216,7 +227,7 @@ class Table {
|
||||
*/
|
||||
protected function drop_key($type, $name)
|
||||
{
|
||||
return $this->command($type, array('name' => $name));
|
||||
return $this->command($type, compact('name'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user