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'); } -} +];