added key and session tasks.

This commit is contained in:
Taylor Otwell
2012-01-24 15:02:51 -06:00
parent 20b4cf7bb8
commit 27fdb1e3f5
7 changed files with 85 additions and 5 deletions

View File

@@ -29,7 +29,6 @@ class Schema {
*/
public static function execute($table)
{
die('here');
foreach ($table->commands as $command)
{
$connection = DB::connection($table->connection);

View File

@@ -144,7 +144,7 @@ class MySQL extends Grammar {
*/
public function primary(Table $table, Fluent $command)
{
return $this->key($table, $command, 'PRIMARY KEY');
return $this->key($table, $command->name(null), 'PRIMARY KEY');
}
/**

View File

@@ -67,7 +67,7 @@ class Table {
* @param string $name
* @return Fluent
*/
public function primary($columns, $name)
public function primary($columns, $name = null)
{
return $this->key(__FUNCTION__, $columns, $name);
}
@@ -148,7 +148,7 @@ class Table {
* @param string $name
* @return void
*/
public function drop_primary($name)
public function drop_primary($name = null)
{
return $this->drop_key(__FUNCTION__, $name);
}