🐛 数据库未进行迁移前初始化

This commit is contained in:
远野千束 2024-08-05 07:13:41 +08:00
parent 51982b63c3
commit ab48396db9
2 changed files with 4 additions and 2 deletions

View File

@ -13,7 +13,7 @@ import requests
from src.utils.base.config import load_from_yaml, config from src.utils.base.config import load_from_yaml, config
from src.utils.base.log import init_log from src.utils.base.log import init_log
from src.utils.base.data_manager import TempConfig, auto_migrate, common_db from src.utils.base.data_manager import TempConfig, common_db
from git import Repo from git import Repo
@ -53,7 +53,6 @@ def init():
""" """
# 检测python版本是否高于3.10 # 检测python版本是否高于3.10
auto_migrate()
init_log() init_log()
if sys.version_info < (3, 10): if sys.version_info < (3, 10):
nonebot.logger.error("Requires Python3.10+ to run, please upgrade your Python Environment.") nonebot.logger.error("Requires Python3.10+ to run, please upgrade your Python Environment.")

View File

@ -68,6 +68,9 @@ def auto_migrate():
common_db.auto_migrate(GlobalPlugin(), StoredConfig(), TempConfig()) common_db.auto_migrate(GlobalPlugin(), StoredConfig(), TempConfig())
auto_migrate()
def set_memory_data(key: str, value) -> None: def set_memory_data(key: str, value) -> None:
""" """
设置内存数据库的数据类似于redis 设置内存数据库的数据类似于redis