From 7bce5f1c1fadc7fd96d5d693e72ca6dabde3e460 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Wed, 24 Dec 2025 09:18:48 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E4=BB=A5=E4=B8=BA=E7=9B=B8=E5=85=B3=E8=A1=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ..._add_indexes_to_web_socket_dialog_msgs.php | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 database/migrations/2025_12_26_000000_add_indexes_to_web_socket_dialog_msgs.php diff --git a/database/migrations/2025_12_26_000000_add_indexes_to_web_socket_dialog_msgs.php b/database/migrations/2025_12_26_000000_add_indexes_to_web_socket_dialog_msgs.php new file mode 100644 index 000000000..ace8897bd --- /dev/null +++ b/database/migrations/2025_12_26_000000_add_indexes_to_web_socket_dialog_msgs.php @@ -0,0 +1,40 @@ +index(['dialog_id', 'deleted_at', 'id']); + $table->index(['reply_id', 'deleted_at']); + }); + + Schema::table('web_socket_dialog_msg_reads', function (Blueprint $table) { + $table->index(['userid', 'silence', 'read_at'], 'idx_ws_msg_reads_userid_silence_read_at'); + $table->index(['dialog_id', 'userid', 'mention', 'read_at'], 'idx_ws_msg_reads_dialog_user_mention_read_at'); + }); + + Schema::table('user_checkin_records', function (Blueprint $table) { + $table->index(['userid', 'mac', 'date'], 'idx_user_checkin_records_userid_mac_date'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // No-op: do not drop indexes automatically. + } +}