From 7deaaed4ddbaaaf040d83c8e488b17c2661a49b4 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 12 Nov 2023 23:32:14 -0700 Subject: [PATCH] Add migration --- ...ollowers_count_index_to_profiles_table.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 database/migrations/2023_11_13_062429_add_followers_count_index_to_profiles_table.php diff --git a/database/migrations/2023_11_13_062429_add_followers_count_index_to_profiles_table.php b/database/migrations/2023_11_13_062429_add_followers_count_index_to_profiles_table.php new file mode 100644 index 000000000..bcc97577c --- /dev/null +++ b/database/migrations/2023_11_13_062429_add_followers_count_index_to_profiles_table.php @@ -0,0 +1,34 @@ +index('followers_count', 'profiles_followers_count_index'); + $table->index('following_count', 'profiles_following_count_index'); + $table->index('status_count', 'profiles_status_count_index'); + $table->index('is_private', 'profiles_is_private_index'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('profiles', function (Blueprint $table) { + $table->dropIndex('profiles_followers_count_index'); + $table->dropIndex('profiles_following_count_index'); + $table->dropIndex('profiles_status_count_index'); + $table->dropIndex('profiles_is_private_index'); + }); + } +};