Skip to content

Commit 2cc970c

Browse files
committed
Add note on renaming database tables. Closes laravel#237.
1 parent 26c9911 commit 2cc970c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

schema.md

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ To create a new database table, the `Schema::create` method is used:
2727

2828
The first argument passed to the `create` method is the name of the table, and the second is a `Closure` which will receive a `Blueprint` object which may be used to define the new table.
2929

30+
To rename an existing database table, the `rename` method may be used:
31+
32+
Schema::rename($from, $to);
33+
3034
To specify which connection the schema operation should take place on, use the `Schema::connection` method:
3135

3236
Schema::connection('foo')->create('users', function($table)

0 commit comments

Comments
 (0)