mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
refactor(db): 修复异步连接池无界增长,并完成 SQLAlchemy 2.0 迁移与分层归位 (#6320)
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 = """
|
||||
|
||||
Reference in New Issue
Block a user