Skip to content

Commit 76fcc56

Browse files
authored
fix: add ChatUIProject & SessionProjectRelation to shared constants & test cases (#7414)
1 parent d42711d commit 76fcc56

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

astrbot/core/backup/constants.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from astrbot.core.db.po import (
99
Attachment,
10+
ChatUIProject,
1011
CommandConfig,
1112
CommandConflict,
1213
ConversationV2,
@@ -16,6 +17,7 @@
1617
PlatformSession,
1718
PlatformStat,
1819
Preference,
20+
SessionProjectRelation,
1921
)
2022
from astrbot.core.knowledge_base.models import (
2123
KBDocument,
@@ -44,6 +46,8 @@
4446
"preferences": Preference,
4547
"platform_message_history": PlatformMessageHistory,
4648
"platform_sessions": PlatformSession,
49+
"chatui_projects": ChatUIProject,
50+
"session_project_relations": SessionProjectRelation,
4751
"attachments": Attachment,
4852
"command_configs": CommandConfig,
4953
"command_conflicts": CommandConflict,

tests/test_backup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
)
1818
from astrbot.core.backup.exporter import AstrBotExporter
1919
from astrbot.core.backup.importer import (
20-
DatabaseClearError,
2120
PLATFORM_STATS_INVALID_COUNT_WARN_LIMIT,
2221
AstrBotImporter,
22+
DatabaseClearError,
2323
ImportResult,
2424
_get_major_version,
2525
)
@@ -1017,6 +1017,8 @@ def test_main_db_models_contain_expected_tables(self):
10171017
"conversations",
10181018
"personas",
10191019
"preferences",
1020+
"chatui_projects",
1021+
"session_project_relations",
10201022
"attachments",
10211023
]
10221024
for table in expected_tables:

0 commit comments

Comments
 (0)