From: Zero Date: Fri, 26 Nov 2021 07:10:39 +0000 (+0800) Subject: Add index for user IP address X-Git-Tag: v21.12~1^2~8^2~7 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/a93254430c3ab643175d9caec20d60bb5a2e3bd2 Add index for user IP address --- diff --git a/database/migrations/2021_11_26_070438_add_index_for_user_ip.php b/database/migrations/2021_11_26_070438_add_index_for_user_ip.php new file mode 100644 index 000000000..c4681a9a3 --- /dev/null +++ b/database/migrations/2021_11_26_070438_add_index_for_user_ip.php @@ -0,0 +1,32 @@ +index('ip', 'ip_address_index'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('activities', function (Blueprint $table) { + $table->dropIndex('ip_address_index'); + }); + } +}