diff --git a/extensions/tags/migrations/2015_10_19_061223_make_slug_unique.php b/extensions/tags/migrations/2015_10_19_061223_make_slug_unique.php index a7c621486..955f8b306 100644 --- a/extensions/tags/migrations/2015_10_19_061223_make_slug_unique.php +++ b/extensions/tags/migrations/2015_10_19_061223_make_slug_unique.php @@ -9,26 +9,21 @@ * 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->table('tags', function (Blueprint $table) use ($schema) { + $schema->table('tags', function (Blueprint $table) { $table->string('slug', 100)->change(); $table->unique('slug'); - - Migration::fixIndexNames($schema, $table); }); }, 'down' => function (Builder $schema) { - $schema->table('tags', function (Blueprint $table) use ($schema) { + $schema->table('tags', function (Blueprint $table) { $table->string('slug', 255)->change(); $table->dropUnique(['slug']); - - Migration::fixIndexNames($schema, $table); }); } ]; diff --git a/extensions/tags/migrations/2018_06_27_085300_change_tags_add_foreign_keys.php b/extensions/tags/migrations/2018_06_27_085300_change_tags_add_foreign_keys.php index 75a4ba28f..53749a3b3 100644 --- a/extensions/tags/migrations/2018_06_27_085300_change_tags_add_foreign_keys.php +++ b/extensions/tags/migrations/2018_06_27_085300_change_tags_add_foreign_keys.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ -use Flarum\Database\Migration; use Illuminate\Database\Query\Expression; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Builder; @@ -31,22 +30,18 @@ return [ 'last_posted_discussion_id' => $select('id', 'discussions', 'last_posted_discussion_id'), ]); - $schema->table('tags', function (Blueprint $table) use ($schema) { + $schema->table('tags', function (Blueprint $table) { $table->foreign('parent_id')->references('id')->on('tags')->onDelete('set null'); $table->foreign('last_posted_user_id')->references('id')->on('users')->onDelete('set null'); $table->foreign('last_posted_discussion_id')->references('id')->on('discussions')->onDelete('set null'); - - Migration::fixIndexNames($schema, $table); }); }, 'down' => function (Builder $schema) { - $schema->table('tags', function (Blueprint $table) use ($schema) { + $schema->table('tags', function (Blueprint $table) { $table->dropForeign(['parent_id']); $table->dropForeign(['last_posted_discussion_id']); $table->dropForeign(['last_posted_user_id']); - - Migration::fixIndexNames($schema, $table); }); } ]; diff --git a/extensions/tags/migrations/2018_06_27_100200_change_tag_user_add_foreign_keys.php b/extensions/tags/migrations/2018_06_27_100200_change_tag_user_add_foreign_keys.php index fd0275fb8..513170027 100644 --- a/extensions/tags/migrations/2018_06_27_100200_change_tag_user_add_foreign_keys.php +++ b/extensions/tags/migrations/2018_06_27_100200_change_tag_user_add_foreign_keys.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ -use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Builder; @@ -27,20 +26,16 @@ return [ }) ->delete(); - $schema->table('tag_user', function (Blueprint $table) use ($schema) { + $schema->table('tag_user', function (Blueprint $table) { $table->foreign('tag_id')->references('id')->on('tags')->onDelete('cascade'); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); - - Migration::fixIndexNames($schema, $table); }); }, 'down' => function (Builder $schema) { - $schema->table('tag_user', function (Blueprint $table) use ($schema) { + $schema->table('tag_user', function (Blueprint $table) { $table->dropForeign(['tag_id']); $table->dropForeign(['user_id']); - - Migration::fixIndexNames($schema, $table); }); } ]; diff --git a/extensions/tags/migrations/2018_06_27_103100_add_discussion_tag_foreign_keys.php b/extensions/tags/migrations/2018_06_27_103100_add_discussion_tag_foreign_keys.php index fdd727a01..1719e2974 100644 --- a/extensions/tags/migrations/2018_06_27_103100_add_discussion_tag_foreign_keys.php +++ b/extensions/tags/migrations/2018_06_27_103100_add_discussion_tag_foreign_keys.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ -use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Builder; @@ -27,20 +26,16 @@ return [ }) ->delete(); - $schema->table('discussion_tag', function (Blueprint $table) use ($schema) { + $schema->table('discussion_tag', function (Blueprint $table) { $table->foreign('discussion_id')->references('id')->on('discussions')->onDelete('cascade'); $table->foreign('tag_id')->references('id')->on('tags')->onDelete('cascade'); - - Migration::fixIndexNames($schema, $table); }); }, 'down' => function (Builder $schema) { - $schema->table('discussion_tag', function (Blueprint $table) use ($schema) { + $schema->table('discussion_tag', function (Blueprint $table) { $table->dropForeign(['discussion_id']); $table->dropForeign(['tag_id']); - - Migration::fixIndexNames($schema, $table); }); } ];