From ebe953cf6394d6a813a0b1f59c6779ce10e220c5 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sat, 2 Nov 2024 09:44:47 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...12841_add_index_to_project_tasks_table.php | 2 +- ..._add_index_to_project_task_users_table.php | 2 +- ...3_12_07_160641_add_index_some_20231217.php | 2 +- ...2_update_owner_add_index_some_20231217.php | 2 +- ...4_03_15_020041_add_index_some_20240315.php | 2 +- ...4_03_17_160641_add_index_some_20240317.php | 2 +- ...4_11_02_094141_add_index_some_20241102.php | 36 +++++++++++++++++++ 7 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 database/migrations/2024_11_02_094141_add_index_some_20241102.php diff --git a/database/migrations/2023_07_01_212841_add_index_to_project_tasks_table.php b/database/migrations/2023_07_01_212841_add_index_to_project_tasks_table.php index 7d2b3f3a4..d44b4f12e 100644 --- a/database/migrations/2023_07_01_212841_add_index_to_project_tasks_table.php +++ b/database/migrations/2023_07_01_212841_add_index_to_project_tasks_table.php @@ -23,7 +23,7 @@ class AddIndexToProjectTasksTable extends Migration /** * Reverse the migrations. * - * @return voidw + * @return void */ public function down() { diff --git a/database/migrations/2023_07_03_212841_add_index_to_project_task_users_table.php b/database/migrations/2023_07_03_212841_add_index_to_project_task_users_table.php index 211c96895..706fc12d8 100644 --- a/database/migrations/2023_07_03_212841_add_index_to_project_task_users_table.php +++ b/database/migrations/2023_07_03_212841_add_index_to_project_task_users_table.php @@ -23,7 +23,7 @@ class AddIndexToProjectTaskUsersTable extends Migration /** * Reverse the migrations. * - * @return voidw + * @return void */ public function down() { diff --git a/database/migrations/2023_12_07_160641_add_index_some_20231217.php b/database/migrations/2023_12_07_160641_add_index_some_20231217.php index 23d0cac84..71eedd4a5 100644 --- a/database/migrations/2023_12_07_160641_add_index_some_20231217.php +++ b/database/migrations/2023_12_07_160641_add_index_some_20231217.php @@ -25,7 +25,7 @@ class AddIndexSome20231217 extends Migration /** * Reverse the migrations. * - * @return voidw + * @return void */ public function down() { diff --git a/database/migrations/2023_12_07_160642_update_owner_add_index_some_20231217.php b/database/migrations/2023_12_07_160642_update_owner_add_index_some_20231217.php index 8c9ea337a..9376ce0e2 100644 --- a/database/migrations/2023_12_07_160642_update_owner_add_index_some_20231217.php +++ b/database/migrations/2023_12_07_160642_update_owner_add_index_some_20231217.php @@ -110,7 +110,7 @@ class UpdateOwnerAddIndexSome20231217 extends Migration /** * Reverse the migrations. * - * @return voidw + * @return void */ public function down() { diff --git a/database/migrations/2024_03_15_020041_add_index_some_20240315.php b/database/migrations/2024_03_15_020041_add_index_some_20240315.php index 560e53a2d..380754a46 100644 --- a/database/migrations/2024_03_15_020041_add_index_some_20240315.php +++ b/database/migrations/2024_03_15_020041_add_index_some_20240315.php @@ -21,7 +21,7 @@ class AddIndexSome20240315 extends Migration /** * Reverse the migrations. * - * @return voidw + * @return void */ public function down() { diff --git a/database/migrations/2024_03_17_160641_add_index_some_20240317.php b/database/migrations/2024_03_17_160641_add_index_some_20240317.php index 028b2e797..62289828e 100644 --- a/database/migrations/2024_03_17_160641_add_index_some_20240317.php +++ b/database/migrations/2024_03_17_160641_add_index_some_20240317.php @@ -22,7 +22,7 @@ class AddIndexSome20240317 extends Migration /** * Reverse the migrations. * - * @return voidw + * @return void */ public function down() { diff --git a/database/migrations/2024_11_02_094141_add_index_some_20241102.php b/database/migrations/2024_11_02_094141_add_index_some_20241102.php new file mode 100644 index 000000000..8eef2b11d --- /dev/null +++ b/database/migrations/2024_11_02_094141_add_index_some_20241102.php @@ -0,0 +1,36 @@ +index(['dialog_id', 'deleted_at']); + }); + Schema::table('deleteds', function (Blueprint $table) { + $table->index(['type', 'userid']); + }); + Schema::table('report_receives', function (Blueprint $table) { + $table->index(['userid', 'read', 'rid']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // 回滚数据 - 无法回滚 + } +}