modify: 数据库建表问题

This commit is contained in:
2026-08-18 13:37:30 +08:00
parent faff9948b9
commit d6b385d2b1
2 changed files with 9 additions and 0 deletions
+4
View File
@@ -12,6 +12,10 @@ from chongming_password import hash_password
from .router import * # noqa: F401,F403 触发 @rpc_method 注册
# 模块加载时即注册 SQLModel 元数据 —— 基类 _bootstrap 建表(create_all)只创建
# 已导入的表,若拖到 on_init 才导入会导致全新库缺少 users 表(no such table)。
from .models.auth import Users # noqa: F401
logger = logging.getLogger(__name__)