From cd9e4187f73cd28fc53d8224967124cbf2877a3f Mon Sep 17 00:00:00 2001 From: kku Date: Fri, 27 Dec 2024 23:00:27 +0100 Subject: [PATCH] Closes #17; Fixed migrations --- main.py | 1 + migrations/202412272043.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 256567c..d186f18 100644 --- a/main.py +++ b/main.py @@ -49,6 +49,7 @@ def main() -> None: # Perform migration if command line argument was provided if args.migrate: + logger.info("Performing migrations...") migrate_database() intents: Intents = Intents().all() diff --git a/migrations/202412272043.py b/migrations/202412272043.py index d1709cb..07c3aed 100644 --- a/migrations/202412272043.py +++ b/migrations/202412272043.py @@ -30,11 +30,11 @@ class Migration(BaseMigration): exc, ) - self.db.groups.update_many( + self.db.users.update_many( {"customchannel": {"$exists": True}}, {"$rename": {"customchannel": "custom_channel"}}, ) - self.db.groups.update_many( + self.db.users.update_many( {"customrole": {"$exists": True}}, {"$rename": {"customrole": "custom_role"}}, ) @@ -69,11 +69,11 @@ class Migration(BaseMigration): exc, ) - self.db.test_collection.update_many( + self.db.users.update_many( {"custom_channel": {"$exists": True}}, {"$rename": {"custom_channel": "customchannel"}}, ) - self.db.test_collection.update_many( + self.db.users.update_many( {"custom_role": {"$exists": True}}, {"$rename": {"custom_role": "customrole"}}, )