From c6d874ad59dbf8b11a9c9c6b44282452c51192c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=98=B1?= Date: Thu, 16 Mar 2023 19:59:30 +0800 Subject: [PATCH] =?UTF-8?q?optimize:=20=E5=88=9B=E5=BB=BA=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E8=A1=A8=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...2023_03_16_194103_update_table_indexes.php | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 database/migrations/2023_03_16_194103_update_table_indexes.php diff --git a/database/migrations/2023_03_16_194103_update_table_indexes.php b/database/migrations/2023_03_16_194103_update_table_indexes.php new file mode 100644 index 000000000..7f28e80d9 --- /dev/null +++ b/database/migrations/2023_03_16_194103_update_table_indexes.php @@ -0,0 +1,41 @@ +index(['userid', 'read_at', 'dialog_id']); + }); + Schema::table('web_socket_dialog_msgs', function (Blueprint $table) { + $table->index('dialog_id'); + $table->index('dialog_type'); + $table->index('userid'); + }); + Schema::table('task_workers', function (Blueprint $table) { + $table->index('deleted_at'); + }); + Schema::table('project_tasks', function (Blueprint $table) { + $table->index(['parent_id', 'deleted_at']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + + } +}