Added foreign key support to schema builder for MySQL, Postgres, and SQL Server.

Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
This commit is contained in:
Taylor Otwell
2012-03-02 09:41:30 -06:00
parent 2032dec0ea
commit 1302ded5f8
4 changed files with 110 additions and 0 deletions

View File

@@ -108,6 +108,17 @@ class Table {
return $this->key(__FUNCTION__, $columns, $name);
}
/**
* Add a foreign key constraint to the table.
*
* @param string|array $columns
* @param string $name
*/
public function foreign($columns, $name = null)
{
return $this->key(__FUNCTION__, $columns, $name);
}
/**
* Create a command for creating any index.
*