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. + } +}