mirror of
https://github.com/flarum/framework.git
synced 2025-02-24 01:57:41 +08:00
Remove unnecessary parameter in migration closure
This commit is contained in:
parent
2b3e925cf9
commit
392ae3db0a
@ -9,12 +9,11 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Illuminate\Database\ConnectionInterface;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Database\Schema\Builder;
|
use Illuminate\Database\Schema\Builder;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'up' => function (Builder $schema, ConnectionInterface $db) {
|
'up' => function (Builder $schema) {
|
||||||
$schema->create('tags', function (Blueprint $table) {
|
$schema->create('tags', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->string('name', 100);
|
$table->string('name', 100);
|
||||||
@ -36,7 +35,7 @@ return [
|
|||||||
$table->integer('last_discussion_id')->unsigned()->nullable();
|
$table->integer('last_discussion_id')->unsigned()->nullable();
|
||||||
});
|
});
|
||||||
|
|
||||||
$db->table('tags')->insert([
|
$schema->getConnection()->table('tags')->insert([
|
||||||
'name' => 'General',
|
'name' => 'General',
|
||||||
'slug' => 'general',
|
'slug' => 'general',
|
||||||
'color' => '#888',
|
'color' => '#888',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user