From f270a609cb2e1ba2020105b5d9dd74f3266debe9 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Wed, 24 Feb 2016 23:13:28 +0900 Subject: [PATCH] Use new migration format --- ..._11_000000_create_mentions_posts_table.php | 21 +++++++------------ ..._11_000000_create_mentions_users_table.php | 21 +++++++------------ 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/extensions/mentions/migrations/2015_05_11_000000_create_mentions_posts_table.php b/extensions/mentions/migrations/2015_05_11_000000_create_mentions_posts_table.php index 95f41ef5e..63af08c68 100644 --- a/extensions/mentions/migrations/2015_05_11_000000_create_mentions_posts_table.php +++ b/extensions/mentions/migrations/2015_05_11_000000_create_mentions_posts_table.php @@ -8,24 +8,19 @@ * file that was distributed with this source code. */ -namespace Flarum\Mentions\Migration; - -use Flarum\Database\AbstractMigration; use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Schema\Builder; -class CreateMentionsPostsTable extends AbstractMigration -{ - public function up() - { - $this->schema->create('mentions_posts', function (Blueprint $table) { +return [ + 'up' => function (Builder $schema) { + $schema->create('mentions_posts', function (Blueprint $table) { $table->integer('post_id')->unsigned(); $table->integer('mentions_id')->unsigned(); $table->primary(['post_id', 'mentions_id']); }); - } + }, - public function down() - { - $this->schema->drop('mentions_posts'); + 'down' => function (Builder $schema) { + $schema->drop('mentions_posts'); } -} +]; diff --git a/extensions/mentions/migrations/2015_05_11_000000_create_mentions_users_table.php b/extensions/mentions/migrations/2015_05_11_000000_create_mentions_users_table.php index 825a5c952..31a1d7b8a 100644 --- a/extensions/mentions/migrations/2015_05_11_000000_create_mentions_users_table.php +++ b/extensions/mentions/migrations/2015_05_11_000000_create_mentions_users_table.php @@ -8,24 +8,19 @@ * file that was distributed with this source code. */ -namespace Flarum\Mentions\Migration; - -use Flarum\Database\AbstractMigration; use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Schema\Builder; -class CreateMentionsUsersTable extends AbstractMigration -{ - public function up() - { - $this->schema->create('mentions_users', function (Blueprint $table) { +return [ + 'up' => function (Builder $schema) { + $schema->create('mentions_users', function (Blueprint $table) { $table->integer('post_id')->unsigned(); $table->integer('mentions_id')->unsigned(); $table->primary(['post_id', 'mentions_id']); }); - } + }, - public function down() - { - $this->schema->drop('mentions_users'); + 'down' => function (Builder $schema) { + $schema->drop('mentions_users'); } -} +];