One more change (comments may need to be altered)
Signed-off-by: Colin Viebrock <colin@viebrock.ca>
This commit is contained in:
parent
7d4a346f84
commit
7293c0448d
|
@ -40,6 +40,25 @@ public static function create($table, $callback)
|
||||||
return static::execute($table);
|
return static::execute($table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename a database table in the schema.
|
||||||
|
*
|
||||||
|
* @param string $table
|
||||||
|
* @param string $name
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public static function rename($table, $rename)
|
||||||
|
{
|
||||||
|
$table = new Schema\Table($table);
|
||||||
|
|
||||||
|
// To indicate that the table needs to be renamed, we will run the
|
||||||
|
// "rename" command on the table instance and pass the instance to
|
||||||
|
// the execute method as calling a Closure isn't needed.
|
||||||
|
$table->rename($name);
|
||||||
|
|
||||||
|
return static::execute($table);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drop a database table from the schema.
|
* Drop a database table from the schema.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue