modify: 数据库建表问题
This commit is contained in:
@@ -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__)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user