From 77bb2299bd1e46c31cedd8c903a4869f998d5f7b Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 5 Dec 2020 00:06:05 -0700 Subject: [PATCH] Add new migration, add index to likes table --- ...2_01_073200_add_indexes_to_likes_table.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 database/migrations/2020_12_01_073200_add_indexes_to_likes_table.php diff --git a/database/migrations/2020_12_01_073200_add_indexes_to_likes_table.php b/database/migrations/2020_12_01_073200_add_indexes_to_likes_table.php new file mode 100644 index 000000000..1a1256fbb --- /dev/null +++ b/database/migrations/2020_12_01_073200_add_indexes_to_likes_table.php @@ -0,0 +1,34 @@ +index('profile_id', 'likes_profile_id_index'); + $table->index('status_id', 'likes_status_id_index'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('likes', function (Blueprint $table) { + $table->dropIndex('likes_profile_id_index'); + $table->dropIndex('likes_status_id_index'); + }); + } +}