From 5f5dbc12f158615d7148f40acd0cc649cdfa5701 Mon Sep 17 00:00:00 2001 From: pushrbx Date: Sun, 4 Dec 2022 21:44:22 +0000 Subject: [PATCH] squashed migrations --- .../2020_05_21_051725_create_index.php | 60 -------------- .../2020_05_21_214747_create_queue_index.php | 37 --------- ...05_21_215040_create_queue_failed_index.php | 35 -------- .../2020_06_07_230022_create_anime_table.php | 80 ------------------ .../2020_06_08_092051_create_manga_table.php | 77 ------------------ .../2020_06_08_093231_create_people_table.php | 59 -------------- ...0_06_08_093529_create_characters_table.php | 56 ------------- ...20_07_10_182531_create_magazines_table.php | 40 --------- .../2020_07_11_120833_create_clubs_table.php | 43 ---------- ...20_07_11_121125_create_producers_table.php | 42 ---------- ...01_16_105532_create_genres_anime_table.php | 81 ------------------- ...01_16_105536_create_genres_manga_table.php | 81 ------------------- .../2022_02_24_051342_create_users_table.php | 48 ----------- 13 files changed, 739 deletions(-) delete mode 100644 database/migrations/2020_05_21_051725_create_index.php delete mode 100644 database/migrations/2020_05_21_214747_create_queue_index.php delete mode 100644 database/migrations/2020_05_21_215040_create_queue_failed_index.php delete mode 100644 database/migrations/2020_06_07_230022_create_anime_table.php delete mode 100644 database/migrations/2020_06_08_092051_create_manga_table.php delete mode 100644 database/migrations/2020_06_08_093231_create_people_table.php delete mode 100644 database/migrations/2020_06_08_093529_create_characters_table.php delete mode 100644 database/migrations/2020_07_10_182531_create_magazines_table.php delete mode 100644 database/migrations/2020_07_11_120833_create_clubs_table.php delete mode 100644 database/migrations/2020_07_11_121125_create_producers_table.php delete mode 100644 database/migrations/2021_01_16_105532_create_genres_anime_table.php delete mode 100644 database/migrations/2021_01_16_105536_create_genres_manga_table.php delete mode 100644 database/migrations/2022_02_24_051342_create_users_table.php diff --git a/database/migrations/2020_05_21_051725_create_index.php b/database/migrations/2020_05_21_051725_create_index.php deleted file mode 100644 index eec9e2b..0000000 --- a/database/migrations/2020_05_21_051725_create_index.php +++ /dev/null @@ -1,60 +0,0 @@ -unique(['request_hash' => 1], 'request_hash'); - }); - - $mapped[] = $table; - } - - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - $mappings = config('controller'); - $mapped = []; - - foreach ($mappings as $controller) { - $table = $controller['table_name']; - if (in_array($table, $mapped) || in_array($table, self::IGNORE) || Schema::hasTable($table)) { - continue; - } - - Schema::dropIfExists($table); - - $mapped[] = $table; - } - } -} diff --git a/database/migrations/2020_05_21_214747_create_queue_index.php b/database/migrations/2020_05_21_214747_create_queue_index.php deleted file mode 100644 index 9bd0d6c..0000000 --- a/database/migrations/2020_05_21_214747_create_queue_index.php +++ /dev/null @@ -1,37 +0,0 @@ -index(['queue', 'reserved_at']); - $table->bigIncrements('id'); - $table->string('queue'); - $table->longText('payload'); - $table->tinyInteger('attempts')->unsigned(); - $table->unsignedInteger('reserved_at')->nullable(); - $table->unsignedInteger('available_at'); - $table->unsignedInteger('created_at'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists(env('QUEUE_TABLE', 'jobs')); - } -} diff --git a/database/migrations/2020_05_21_215040_create_queue_failed_index.php b/database/migrations/2020_05_21_215040_create_queue_failed_index.php deleted file mode 100644 index f684aca..0000000 --- a/database/migrations/2020_05_21_215040_create_queue_failed_index.php +++ /dev/null @@ -1,35 +0,0 @@ -increments('id'); - $table->text('connection'); - $table->text('queue'); - $table->longText('payload'); - $table->longText('exception'); - $table->timestamp('failed_at')->useCurrent(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists(env('QUEUE_FAILED_TABLE', 'jobs_failed')); - } -} diff --git a/database/migrations/2020_06_07_230022_create_anime_table.php b/database/migrations/2020_06_07_230022_create_anime_table.php deleted file mode 100644 index f0e346f..0000000 --- a/database/migrations/2020_06_07_230022_create_anime_table.php +++ /dev/null @@ -1,80 +0,0 @@ -unique(['request_hash' => 1], 'request_hash'); - $table->unique(['mal_id' => 1], 'mal_id'); - - $table->index('aired', 'aired'); - $table->index(['aired.from' => 1], 'aired.from'); - $table->index(['aired.to' => 1], 'aired.to'); - $table->index('airing', 'airing'); - $table->index('demographics.mal_id', 'demographics.mal_id'); - $table->index('explicit_genres.mal_id', 'explicit_genres.mal_id'); - $table->index('genres.mal_id', 'genres.mal_id'); - $table->index('licensors.mal_id', 'licensors.mal_id'); - $table->index('producers.mal_id', 'producers.mal_id'); - $table->index('studios.mal_id', 'studios.mal_id'); - $table->index('themes.mal_id', 'themes.mal_id'); - - $table->index('episodes', 'episodes'); - $table->integer('members')->index('members'); - $table->integer('favorites')->index('favorites'); - $table->integer('popularity')->index('popularity'); - $table->integer('rank')->index('rank')->nullable(); - $table->index('rating', 'rating'); - $table->float('score')->index('score'); - $table->integer('scored_by')->index('scored_by'); - $table->index('status', 'status'); - $table->index('type', 'type'); - $table->index('source', 'source'); - - $table->index('title', 'title'); - $table->index('title_english', 'title_english'); - $table->index('title_japanese', 'title_japanese'); - $table->index('title_synonyms', 'title_synonyms'); - - - $table->index( - [ - 'title' => 'text', - 'title_japanese' => 'text' - ], - 'search', - null, - [ - 'weights' => [ - 'title' => 50, - 'title_japanese' => 5 - ], - 'name' => 'search' - ] - ); - - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('anime'); - } -} diff --git a/database/migrations/2020_06_08_092051_create_manga_table.php b/database/migrations/2020_06_08_092051_create_manga_table.php deleted file mode 100644 index e59ed1c..0000000 --- a/database/migrations/2020_06_08_092051_create_manga_table.php +++ /dev/null @@ -1,77 +0,0 @@ -unique(['request_hash' => 1], 'request_hash'); - $table->unique(['mal_id' => 1], 'mal_id'); - - $table->index('published', 'published'); - $table->index(['published.from' => 1], 'published.from'); - $table->index(['published.to' => 1], 'published.to'); - $table->index('publishing', 'publishing'); - $table->index('demographics.mal_id', 'demographics.mal_id'); - $table->index('explicit_genres.mal_id', 'explicit_genres.mal_id'); - $table->index('genres.mal_id', 'genres.mal_id'); - $table->index('authors.mal_id', 'authors.mal_id'); - $table->index('serializations.mal_id', 'serializations.mal_id'); - $table->index('themes.mal_id', 'themes.mal_id'); - - $table->index('chapters', 'chapters'); - $table->index('volumes', 'volumes'); - $table->integer('members')->index('members'); - $table->integer('favorites')->index('favorites'); - $table->integer('popularity')->index('popularity'); - $table->integer('rank')->index('rank')->nullable(); - $table->float('score')->index('score'); - $table->integer('scored_by')->index('scored_by'); - $table->index('status', 'status'); - $table->index('type', 'type'); - - $table->index('title', 'title'); - $table->index('title_english', 'title_english'); - $table->index('title_japanese', 'title_japanese'); - $table->index('title_synonyms', 'title_synonyms'); - - - $table->index( - [ - 'title' => 'text', - 'title_japanese' => 'text' - ], - 'search', - null, - [ - 'weights' => [ - 'title' => 50, - 'title_japanese' => 5 - ], - 'name' => 'search' - ] - ); - - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('manga'); - } -} diff --git a/database/migrations/2020_06_08_093231_create_people_table.php b/database/migrations/2020_06_08_093231_create_people_table.php deleted file mode 100644 index 6d41412..0000000 --- a/database/migrations/2020_06_08_093231_create_people_table.php +++ /dev/null @@ -1,59 +0,0 @@ -unique(['request_hash' => 1], 'request_hash'); - $table->unique(['mal_id' => 1], 'mal_id'); - - $table->date('birthday')->index('birthday'); - $table->index('member_favorites', 'member_favorites'); - - $table->index('name', 'name'); - $table->string('given_name')->index('given_name')->nullable(); - $table->string('family_name')->index('family_name')->nullable(); - $table->index('alternate_names', 'alternate_names'); - - $table->index( - [ - 'name' => 'text', - 'given_name' => 'text', - 'family_name' => 'text' - ], - 'search', - null, - [ - 'weights' => [ - 'name' => 50, - 'given_name' => 5, - 'family_name' => 5, - ], - 'name' => 'search' - ] - ); - - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('people'); - } -} diff --git a/database/migrations/2020_06_08_093529_create_characters_table.php b/database/migrations/2020_06_08_093529_create_characters_table.php deleted file mode 100644 index ccd7289..0000000 --- a/database/migrations/2020_06_08_093529_create_characters_table.php +++ /dev/null @@ -1,56 +0,0 @@ -unique(['request_hash' => 1], 'request_hash'); - $table->unique(['mal_id' => 1], 'mal_id'); - - $table->date('birthday')->index('birthday'); - $table->index('member_favorites', 'member_favorites'); - - $table->index('name', 'name'); - $table->string('name_kanji')->index('name_kanji'); - $table->string('nicknames')->index('nicknames'); - - $table->index( - [ - 'name' => 'text', - 'name_kanji' => 'text' - ], - 'search', - null, - [ - 'weights' => [ - 'name' => 50, - 'name_kanji' => 5 - ], - 'name' => 'search' - ] - ); - - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('characters'); - } -} diff --git a/database/migrations/2020_07_10_182531_create_magazines_table.php b/database/migrations/2020_07_10_182531_create_magazines_table.php deleted file mode 100644 index 8b57da7..0000000 --- a/database/migrations/2020_07_10_182531_create_magazines_table.php +++ /dev/null @@ -1,40 +0,0 @@ -unique(['mal_id' => 1], 'mal_id'); - $table->index('count', 'count'); - $table->index('name', 'name'); - - $table->index( - [ - 'name' => 'text' - ], - 'search' - ); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('magazines'); - } -} diff --git a/database/migrations/2020_07_11_120833_create_clubs_table.php b/database/migrations/2020_07_11_120833_create_clubs_table.php deleted file mode 100644 index 630a21e..0000000 --- a/database/migrations/2020_07_11_120833_create_clubs_table.php +++ /dev/null @@ -1,43 +0,0 @@ -unique(['request_hash' => 1], 'request_hash'); - $table->unique(['mal_id' => 1], 'mal_id'); - $table->index('name'); - $table->index('members', 'members'); - $table->index('category'); - $table->date('created')->index(); - $table->index('access'); - - $table->index( - [ - 'name' => 'text' - ], - 'search' - ); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('clubs'); - } -} diff --git a/database/migrations/2020_07_11_121125_create_producers_table.php b/database/migrations/2020_07_11_121125_create_producers_table.php deleted file mode 100644 index 2902637..0000000 --- a/database/migrations/2020_07_11_121125_create_producers_table.php +++ /dev/null @@ -1,42 +0,0 @@ -unique(['mal_id' => 1], 'mal_id'); - $table->index('count', 'count'); - $table->index('name', 'name'); - $table->index('titles', 'titles'); - $table->index('established', 'established'); - $table->index('favorites', 'favorites'); - - $table->index( - [ - 'name' => 'text' - ], - 'search' - ); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('producers'); - } -} diff --git a/database/migrations/2021_01_16_105532_create_genres_anime_table.php b/database/migrations/2021_01_16_105532_create_genres_anime_table.php deleted file mode 100644 index 85743b4..0000000 --- a/database/migrations/2021_01_16_105532_create_genres_anime_table.php +++ /dev/null @@ -1,81 +0,0 @@ -unique(['mal_id' => 1], 'mal_id'); - $table->index('count', 'count'); - $table->index('name', 'name'); - - $table->index( - [ - 'name' => 'text' - ], - 'search' - ); - }); - - Schema::create('demographics_anime', function (Blueprint $table) { - $table->unique(['mal_id' => 1], 'mal_id'); - $table->index('count', 'count'); - $table->index('name', 'name'); - - $table->index( - [ - 'name' => 'text' - ], - 'search' - ); - }); - - Schema::create('explicit_genres_anime', function (Blueprint $table) { - $table->unique(['mal_id' => 1], 'mal_id'); - $table->index('count', 'count'); - $table->index('name', 'name'); - - $table->index( - [ - 'name' => 'text' - ], - 'search' - ); - }); - - Schema::create('themes_anime', function (Blueprint $table) { - $table->unique(['mal_id' => 1], 'mal_id'); - $table->index('count', 'count'); - $table->index('name', 'name'); - - $table->index( - [ - 'name' => 'text' - ], - 'search' - ); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('genres_anime'); - Schema::dropIfExists('demographics_anime'); - Schema::dropIfExists('explicit_genres_anime'); - Schema::dropIfExists('themes_anime'); - } -} diff --git a/database/migrations/2021_01_16_105536_create_genres_manga_table.php b/database/migrations/2021_01_16_105536_create_genres_manga_table.php deleted file mode 100644 index 43c4592..0000000 --- a/database/migrations/2021_01_16_105536_create_genres_manga_table.php +++ /dev/null @@ -1,81 +0,0 @@ -unique(['mal_id' => 1], 'mal_id'); - $table->index('count', 'count'); - $table->index('name', 'name'); - - $table->index( - [ - 'name' => 'text' - ], - 'search' - ); - }); - - Schema::create('explicit_genres_manga', function (Blueprint $table) { - $table->unique(['mal_id' => 1], 'mal_id'); - $table->index('count', 'count'); - $table->index('name', 'name'); - - $table->index( - [ - 'name' => 'text' - ], - 'search' - ); - }); - - Schema::create('demographics_manga', function (Blueprint $table) { - $table->unique(['mal_id' => 1], 'mal_id'); - $table->index('count', 'count'); - $table->index('name', 'name'); - - $table->index( - [ - 'name' => 'text' - ], - 'search' - ); - }); - - Schema::create('themes_manga', function (Blueprint $table) { - $table->unique(['mal_id' => 1], 'mal_id'); - $table->index('count', 'count'); - $table->index('name', 'name'); - - $table->index( - [ - 'name' => 'text' - ], - 'search' - ); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('genres_manga'); - Schema::dropIfExists('explicit_genres_manga'); - Schema::dropIfExists('demographics_manga'); - Schema::dropIfExists('themes_manga'); - } -} diff --git a/database/migrations/2022_02_24_051342_create_users_table.php b/database/migrations/2022_02_24_051342_create_users_table.php deleted file mode 100644 index c1d789b..0000000 --- a/database/migrations/2022_02_24_051342_create_users_table.php +++ /dev/null @@ -1,48 +0,0 @@ -unique(['request_hash' => 1], 'request_hash'); - $table->unique(['mal_id' => 1], 'mal_id'); - $table->unique(['internal_username' => 1], 'internal_username'); - - $table->date('joined')->index('joined'); - $table->date('birthday')->index('birthday'); - $table->date('last_online')->index('last_online'); - - $table->index('gender', 'gender'); - $table->index('location', 'location'); - - $table->index( - [ - 'internal_username' => 'text' - ], - 'search' - ); - - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('users'); - } -}