From 64641d4101301aecf9fae9e999786e6b301cdcbe Mon Sep 17 00:00:00 2001 From: Akulij Date: Wed, 30 Apr 2025 19:22:17 +0300 Subject: [PATCH] do not drop indexes in migration --- src/db/mod.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/db/mod.rs b/src/db/mod.rs index 81366a1..b3f40c8 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -125,9 +125,6 @@ impl DB { let db = self.get_database().await; /// some migrations doesn't realy need type of collection type AnyCollection = Event; - db.collection::("events") - .drop_indexes() - .await?; let events = self.get_database().await.collection::("events"); events .create_index( @@ -138,9 +135,6 @@ impl DB { ) .await?; - db.collection::("events") - .drop_indexes() - .await?; // clear callbacks after a day because otherwise database will contain so much data // for just button clicks let callback_info = self