收口 MNote P0 P1 P2 审查尾项
- 归档 OnlyOffice live bridge、Page AI、mindmap、design governance 与相关 bug 条目 - 补齐 MinerU OCR 后端 runtime 合同与 smoke/test 基线 - 收口 ChatOnly/Doubao、ObjectIdentity、Page Aggregate compat 与 runtime owner 文档口径 验证: - cargo test --manifest-path rust/Cargo.toml -p mnote-web local_ocr -- --test-threads=1 - cargo test --manifest-path rust/Cargo.toml -p mnote-web onlyoffice_bridge -- --test-threads=1 - git diff --check - git diff --cached --check - codegraph index . --force && codegraph status . - codegraph sync . && codegraph status .
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
CREATE TABLE IF NOT EXISTS ai_external_conversation_bindings (
|
||||
id TEXT PRIMARY KEY,
|
||||
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
workspace_id TEXT,
|
||||
mnote_session_id TEXT NOT NULL,
|
||||
acp_session_id TEXT,
|
||||
agent_id TEXT NOT NULL,
|
||||
profile TEXT NOT NULL,
|
||||
provider TEXT NOT NULL,
|
||||
remote_conversation_id TEXT NOT NULL,
|
||||
remote_url TEXT,
|
||||
status TEXT NOT NULL DEFAULT 'active',
|
||||
metadata_json TEXT NOT NULL DEFAULT '{}',
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
deleted_at TEXT,
|
||||
revision INTEGER NOT NULL DEFAULT 1,
|
||||
CHECK (status IN ('active', 'local_deleted', 'remote_deleted', 'remote_delete_failed', 'remote_missing'))
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS idx_ai_external_conv_user_session_provider
|
||||
ON ai_external_conversation_bindings(user_id, mnote_session_id, provider);
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS idx_ai_external_conv_user_provider_remote
|
||||
ON ai_external_conversation_bindings(user_id, provider, remote_conversation_id);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_ai_external_conv_lookup
|
||||
ON ai_external_conversation_bindings(user_id, workspace_id, mnote_session_id, provider, status);
|
||||
Reference in New Issue
Block a user