mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-30 02:14:43 +08:00
feat: add database migration v9→v10 for Hermes support (Phase 2)
- Bump SCHEMA_VERSION from 9 to 10 - Add enabled_hermes column to mcp_servers and skills tables - Add migrate_v9_to_v10 with table_exists guard for skills (may not exist in databases migrated from very old versions) - Update dao/mcp.rs to fully read/write enabled_hermes in all queries - Update dao/skills.rs: don't SELECT enabled_hermes (Hermes doesn't support Skills yet), keep column indices clean
This commit is contained in:
@@ -44,7 +44,7 @@ use std::sync::Mutex;
|
||||
|
||||
/// 当前 Schema 版本号
|
||||
/// 每次修改表结构时递增,并在 schema.rs 中添加相应的迁移逻辑
|
||||
pub(crate) const SCHEMA_VERSION: i32 = 9;
|
||||
pub(crate) const SCHEMA_VERSION: i32 = 10;
|
||||
|
||||
/// 安全地序列化 JSON,避免 unwrap panic
|
||||
pub(crate) fn to_json_string<T: Serialize>(value: &T) -> Result<String, AppError> {
|
||||
|
||||
Reference in New Issue
Block a user