refactor(db): 修复异步连接池无界增长,并完成 SQLAlchemy 2.0 迁移与分层归位 (#6320)

This commit is contained in:
Aqr-K
2026-08-15 06:58:38 +08:00
committed by GitHub
parent e28de9cfe1
commit 8a11214a43
252 changed files with 11405 additions and 2889 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ Create Date: 2024-09-11 08:07:02.753307
"""
from app.db.systemconfig_oper import SystemConfigOper
from app.db.oper.systemconfig import SystemConfigOper
from app.schemas.types import SystemConfigKey
# revision identifiers, used by Alembic.
+1 -1
View File
@@ -12,7 +12,7 @@ from app.runtime.config import settings
from app.application.security.access import get_password_hash
from app.db import SessionFactory
from app.db.models import *
from app.db.systemconfig_oper import SystemConfigOper
from app.db.oper.systemconfig import SystemConfigOper
from app.runtime.log import logger
from app.schemas.types import SystemConfigKey
+1 -1
View File
@@ -9,7 +9,7 @@ from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import sqlite
from app.db.systemconfig_oper import SystemConfigOper
from app.db.oper.systemconfig import SystemConfigOper
from app.schemas.types import SystemConfigKey
# revision identifiers, used by Alembic.
+1 -1
View File
@@ -7,7 +7,7 @@ Create Date: 2025-05-13 19:49:51.271319
"""
import re
from app.db.systemconfig_oper import SystemConfigOper
from app.db.oper.systemconfig import SystemConfigOper
from app.schemas.types import SystemConfigKey
# revision identifiers, used by Alembic.
+1 -1
View File
@@ -6,7 +6,7 @@ Revises: e8b1c4d7a2f9
Create Date: 2026-08-10
"""
from app.db.systemconfig_oper import SystemConfigOper
from app.db.oper.systemconfig import SystemConfigOper
from app.runtime.log import logger
from app.schemas.types import SystemConfigKey
+1 -1
View File
@@ -6,7 +6,7 @@ Create Date: 2025-05-03 17:29:07.635618
"""
from app.db.systemconfig_oper import SystemConfigOper
from app.db.oper.systemconfig import SystemConfigOper
from app.schemas.types import SystemConfigKey
# revision identifiers, used by Alembic.
+1 -1
View File
@@ -6,7 +6,7 @@ Create Date: 2024-11-14 12:49:13.838120
"""
from app.db.systemconfig_oper import SystemConfigOper
from app.db.oper.systemconfig import SystemConfigOper
from app.schemas.types import SystemConfigKey
# revision identifiers, used by Alembic.
+1 -1
View File
@@ -6,7 +6,7 @@ Create Date: 2024-10-16 15:05:01.775429
"""
from app.db.systemconfig_oper import SystemConfigOper
from app.db.oper.systemconfig import SystemConfigOper
from app.schemas.types import SystemConfigKey
# revision identifiers, used by Alembic.
+1 -1
View File
@@ -63,7 +63,7 @@ def upgrade() -> None:
])
# 只升级系统旧默认模板;用户编辑过的模板保持原样。
from app.db.systemconfig_oper import SystemConfigOper
from app.db.oper.systemconfig import SystemConfigOper
from app.schemas.types import SystemConfigKey
legacy_organize = """