mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
fix: add ChatUIProject & SessionProjectRelation to shared constants & test cases (#7414)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user