diff --git a/extensions/tags/migrations/2015_02_24_000000_create_discussions_tags_table.php b/extensions/tags/migrations/2015_02_24_000000_create_discussions_tags_table.php index 1768b86e2..03180594b 100644 --- a/extensions/tags/migrations/2015_02_24_000000_create_discussions_tags_table.php +++ b/extensions/tags/migrations/2015_02_24_000000_create_discussions_tags_table.php @@ -8,19 +8,14 @@ * file that was distributed with this source code. */ +use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Schema\Builder; -return [ - 'up' => function (Builder $schema) { - $schema->create('discussions_tags', function (Blueprint $table) { - $table->integer('discussion_id')->unsigned(); - $table->integer('tag_id')->unsigned(); - $table->primary(['discussion_id', 'tag_id']); - }); - }, - - 'down' => function (Builder $schema) { - $schema->drop('discussions_tags'); +return Migration::createTable( + 'discussions_tags', + function (Blueprint $table) { + $table->integer('discussion_id')->unsigned(); + $table->integer('tag_id')->unsigned(); + $table->primary(['discussion_id', 'tag_id']); } -]; +); diff --git a/extensions/tags/migrations/2015_02_24_000000_create_users_tags_table.php b/extensions/tags/migrations/2015_02_24_000000_create_users_tags_table.php index d76f3644f..e249a82a2 100644 --- a/extensions/tags/migrations/2015_02_24_000000_create_users_tags_table.php +++ b/extensions/tags/migrations/2015_02_24_000000_create_users_tags_table.php @@ -8,21 +8,16 @@ * file that was distributed with this source code. */ +use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Schema\Builder; -return [ - 'up' => function (Builder $schema) { - $schema->create('users_tags', function (Blueprint $table) { - $table->integer('user_id')->unsigned(); - $table->integer('tag_id')->unsigned(); - $table->dateTime('read_time')->nullable(); - $table->boolean('is_hidden')->default(0); - $table->primary(['user_id', 'tag_id']); - }); - }, - - 'down' => function (Builder $schema) { - $schema->drop('users_tags'); +return Migration::createTable( + 'users_tags', + function (Blueprint $table) { + $table->integer('user_id')->unsigned(); + $table->integer('tag_id')->unsigned(); + $table->dateTime('read_time')->nullable(); + $table->boolean('is_hidden')->default(0); + $table->primary(['user_id', 'tag_id']); } -]; +);