mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-01 17:00:21 +08:00
fix: 迁移脚本补充 inspect 导入,HardwareTooltip 兼容多种硬件字段格式
- 迁移脚本缺少 inspect 导入导致运行时报错 - HardwareTooltip 使用 pickNumber/pickString 兼容不同节点上报的字段名 - 添加 tooltip 点击交互和 title 属性作为 fallback
This commit is contained in:
@@ -11,7 +11,7 @@ from __future__ import annotations
|
||||
from collections.abc import Sequence
|
||||
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy import text
|
||||
from sqlalchemy import inspect, text
|
||||
|
||||
from alembic import op
|
||||
|
||||
@@ -69,6 +69,7 @@ def upgrade() -> None:
|
||||
"""))
|
||||
|
||||
# 创建索引
|
||||
inspector = inspect(conn)
|
||||
existing_indexes = {idx["name"] for idx in inspector.get_indexes("usage")}
|
||||
for idx_name, table, columns in NEW_INDEXES:
|
||||
if idx_name not in existing_indexes:
|
||||
|
||||
Reference in New Issue
Block a user