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'); + }); + } +};