feat: minimum working comments app
Python Lint CI / ty (push) Successful in 58s
TS Lint / ESLint (push) Successful in 58s
Python Lint CI / ruff (push) Successful in 58s
Python Lint CI / ruff-format-check (push) Successful in 58s
TS Lint / TypeScript (push) Successful in 3m28s
TS Lint / Oxlint (push) Successful in 3m28s
Python Lint CI / ty (push) Successful in 58s
TS Lint / ESLint (push) Successful in 58s
Python Lint CI / ruff (push) Successful in 58s
Python Lint CI / ruff-format-check (push) Successful in 58s
TS Lint / TypeScript (push) Successful in 3m28s
TS Lint / Oxlint (push) Successful in 3m28s
This commit is contained in:
+8
-2
@@ -25,9 +25,15 @@ class Database:
|
||||
)
|
||||
|
||||
def init(self) -> typing.Self:
|
||||
self.logger.info("Initializing database")
|
||||
tortoise.run_async(tortoise.Tortoise.init(config=self.config))
|
||||
self.logger.info("Migrating database")
|
||||
tortoise.run_async(tortoise.migrations.api.migrate(config=self.config))
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user