From f529f24aec0541a7cd9c62266349f23041eae5e9 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 4 Mar 2016 01:11:49 +0900 Subject: [PATCH] Use new shortcuts for migrations --- ...02_24_000000_add_locked_to_discussions.php | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/extensions/lock/migrations/2015_02_24_000000_add_locked_to_discussions.php b/extensions/lock/migrations/2015_02_24_000000_add_locked_to_discussions.php index c8b93a062..fb06df633 100644 --- a/extensions/lock/migrations/2015_02_24_000000_add_locked_to_discussions.php +++ b/extensions/lock/migrations/2015_02_24_000000_add_locked_to_discussions.php @@ -8,19 +8,8 @@ * file that was distributed with this source code. */ -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Schema\Builder; +use Flarum\Database\Migration; -return [ - 'up' => function (Builder $schema) { - $schema->table('discussions', function (Blueprint $table) { - $table->boolean('is_locked')->default(0); - }); - }, - - 'down' => function (Builder $schema) { - $schema->table('discussions', function (Blueprint $table) { - $table->dropColumn('is_locked'); - }); - } -]; +return Migration::addColumns('discussions', [ + 'is_locked' => ['boolean', 'default' => 0] +]);