feat(bot): ✨ Finish migrating to k8s.

This commit is contained in:
Nyeki.py
2024-10-31 12:17:02 -03:00
parent c0616cbcfe
commit cd578e43bd
4 changed files with 22 additions and 19 deletions
+2 -5
View File
@@ -1,4 +1,4 @@
import aerich
import os
from payphone import bot
from payphone.db import setup
@@ -19,10 +19,7 @@ async def init() -> None:
"""Initializes the DB."""
if config.SHARD_ID == 0:
command = aerich.Command(config.TORTOISE_ORM, "models", "./payphone/db/migrations")
await command.init_db(True)
await command.upgrade()
os.system("aerich upgrade")
await setup.init()