diff --git a/app/database.py b/app/database.py index 073ac68..5e3cd14 100644 --- a/app/database.py +++ b/app/database.py @@ -24,16 +24,12 @@ class Database: }, ) - def init(self) -> typing.Self: + def init(self) -> None: self.logger.info("Migrating database") tortoise.run_async(tortoise.migrations.api.migrate(config=self.config)) + self.logger.info("Database migrated") self.logger.info("Initializing database") tortoise.run_async( tortoise.Tortoise.init(config=self.config, _enable_global_fallback=True) ) self.logger.info("Database ready") - return self - - def __enter__(self) -> typing.Self: - - return self