From 72a3d2fb947d9ce951e6fd4d48a59e0b19b497e2 Mon Sep 17 00:00:00 2001 From: NULL Date: Sun, 27 Jul 2025 20:33:28 +0800 Subject: [PATCH 1/2] 123 --- code/database/mongo/migrations/novel.php | 8 ++++++++ code/database/mongo/migrations/novel_clicks.php | 4 ++++ code/database/mongo/migrations/video_clicks.php | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/code/database/mongo/migrations/novel.php b/code/database/mongo/migrations/novel.php index ae80f92..0be289e 100644 --- a/code/database/mongo/migrations/novel.php +++ b/code/database/mongo/migrations/novel.php @@ -46,5 +46,13 @@ return [ 'key' => ['n_have_chapter' => 1], 'options' => ['unique' => false] ], + [ + 'key' => ['n_update_time' => 1], + 'options' => ['unique' => false] + ], + [ + 'key' => ['n_category' => 1, 'n_have_chapter' => 1, 'n_update_time' => -1], + 'options' => ['unique' => false] + ], ] ]; diff --git a/code/database/mongo/migrations/novel_clicks.php b/code/database/mongo/migrations/novel_clicks.php index 66665a7..52f7875 100644 --- a/code/database/mongo/migrations/novel_clicks.php +++ b/code/database/mongo/migrations/novel_clicks.php @@ -6,5 +6,9 @@ return [ 'key' => ['n_id' => 1, 'nc_date' => 1, 'nc_type' => 1], 'options' => ['unique' => true] ], + [ + 'key' => ['nc_clicks' => -1], + 'options' => ['unique' => false] + ], ] ]; diff --git a/code/database/mongo/migrations/video_clicks.php b/code/database/mongo/migrations/video_clicks.php index 6e8bb78..7d93991 100644 --- a/code/database/mongo/migrations/video_clicks.php +++ b/code/database/mongo/migrations/video_clicks.php @@ -22,5 +22,9 @@ return [ 'key' => ['v_parent_category_en' => 1], 'options' => ['unique' => false] ], + [ + 'key' => ['vc_clicks' => -1], + 'options' => ['unique' => false] + ], ] ]; From 69f800b10e62fc261936db91e8ab109ab5027335 Mon Sep 17 00:00:00 2001 From: NULL Date: Sun, 27 Jul 2025 20:46:33 +0800 Subject: [PATCH 2/2] 123 --- code/database/mongo/migrations/novel.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/database/mongo/migrations/novel.php b/code/database/mongo/migrations/novel.php index 0be289e..ca81e49 100644 --- a/code/database/mongo/migrations/novel.php +++ b/code/database/mongo/migrations/novel.php @@ -54,5 +54,10 @@ return [ 'key' => ['n_category' => 1, 'n_have_chapter' => 1, 'n_update_time' => -1], 'options' => ['unique' => false] ], + + [ + 'key' => ['n_have_chapter' => 1, 'n_forge_novel' => 1], + 'options' => ['unique' => false] + ], ] ];