From bba105748ba706be115533e1440654ce9fc5c8d4 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 4 Mar 2016 01:10:25 +0900 Subject: [PATCH] Use new shortcuts for migrations --- ...2015_10_31_040129_add_is_spam_to_posts.php | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/extensions/akismet/migrations/2015_10_31_040129_add_is_spam_to_posts.php b/extensions/akismet/migrations/2015_10_31_040129_add_is_spam_to_posts.php index 0a6fcd423..cedd64012 100644 --- a/extensions/akismet/migrations/2015_10_31_040129_add_is_spam_to_posts.php +++ b/extensions/akismet/migrations/2015_10_31_040129_add_is_spam_to_posts.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('posts', function (Blueprint $table) { - $table->boolean('is_spam')->default(0); - }); - }, - - 'down' => function (Builder $schema) { - $schema->table('posts', function (Blueprint $table) { - $table->dropColumn('is_spam'); - }); - } -]; +return Migration::addColumns('posts', [ + 'is_spam' => ['boolean', 'default' => 0] +]);