Merge pull request #480 from cviebrock/schema-rename
Schema::rename('oldtable','newtable') support
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user