Merge pull request #480 from cviebrock/schema-rename

Schema::rename('oldtable','newtable') support
This commit is contained in:
Taylor Otwell
2012-07-19 13:42:34 -07:00
6 changed files with 80 additions and 2 deletions

View File

@@ -212,6 +212,18 @@ class MySQL extends Grammar {
return 'ALTER TABLE '.$this->wrap($table)." ADD {$type} {$name}({$keys})";
}
/**
* Generate the SQL statement for a rename table command.
*
* @param Table $table
* @param Fluent $command
* @return string
*/
public function rename(Table $table, Fluent $command)
{
return 'RENAME TABLE '.$this->wrap($table).' TO '.$this->wrap($command->name);
}
/**
* Generate the SQL statement for a drop table command.
*