From 4d6717967d0876a3207dccfd386536b051cb5445 Mon Sep 17 00:00:00 2001 From: Akulij Date: Wed, 30 Apr 2025 18:07:07 +0300 Subject: [PATCH] create AnyCollection type in migration reason: most of it doesn't need real type, but will simplificate alot without real ones --- src/db/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/db/mod.rs b/src/db/mod.rs index 7cb7ac7..8d1d458 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -122,6 +122,9 @@ impl DB { } pub async fn migrate(&mut self) -> DbResult<()> { + let db = self.get_database().await; + /// some migrations doesn't realy need type of collection + type AnyCollection = Event; let events = self.get_database().await.collection::("events"); events .create_index( @@ -137,7 +140,7 @@ impl DB { let callback_info = self .get_database() .await - .collection::("callback_info"); + .collection::("callback_info"); callback_info .create_index( IndexModel::builder()