fix: add ChatUIProject & SessionProjectRelation to shared constants & test cases (#7414)

This commit is contained in:
Ruochen Pan
2026-04-08 11:35:59 +08:00
committed by GitHub
parent d42711d687
commit 76fcc56866
2 changed files with 7 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ from sqlmodel import SQLModel
from astrbot.core.db.po import (
Attachment,
ChatUIProject,
CommandConfig,
CommandConflict,
ConversationV2,
@@ -16,6 +17,7 @@ from astrbot.core.db.po import (
PlatformSession,
PlatformStat,
Preference,
SessionProjectRelation,
)
from astrbot.core.knowledge_base.models import (
KBDocument,
@@ -44,6 +46,8 @@ MAIN_DB_MODELS: dict[str, type[SQLModel]] = {
"preferences": Preference,
"platform_message_history": PlatformMessageHistory,
"platform_sessions": PlatformSession,
"chatui_projects": ChatUIProject,
"session_project_relations": SessionProjectRelation,
"attachments": Attachment,
"command_configs": CommandConfig,
"command_conflicts": CommandConflict,

View File

@@ -17,9 +17,9 @@ from astrbot.core.backup import (
)
from astrbot.core.backup.exporter import AstrBotExporter
from astrbot.core.backup.importer import (
DatabaseClearError,
PLATFORM_STATS_INVALID_COUNT_WARN_LIMIT,
AstrBotImporter,
DatabaseClearError,
ImportResult,
_get_major_version,
)
@@ -1017,6 +1017,8 @@ class TestModelMappings:
"conversations",
"personas",
"preferences",
"chatui_projects",
"session_project_relations",
"attachments",
]
for table in expected_tables: