合并云端身份与记忆 PR#102(6e9d6dc)到最新 main ea5ab62

This commit is contained in:
host committed 2026-10-28 11:58:49 +08:00
commit b93666fbe8
6 files changed
+949

No files matched your search

+21
View File
@@ -946,6 +946,27 @@ POSTGRES_SCHEMA = (
"preference TEXT NOT NULL, "
"created_at DOUBLE PRECISION, "
"UNIQUE(project_id, user_id, channel, target))",
# System-level identity (cloud/identity.py): TEXT primary keys,
# so no IDENTITY sequence to keep in sync in migrations.py.
# DDL must match cloud/identity.py CREATE TABLE statements.
"CREATE TABLE IF NOT EXISTS user_profiles("
"user_id TEXT PRIMARY KEY, "
"display_name TEXT, "
"timezone TEXT, "
"preferences TEXT, "
"updated_at DOUBLE PRECISION)",
"CREATE TABLE IF NOT EXISTS identity_memories("
"id TEXT PRIMARY KEY, "
"owner_user_id TEXT, "
"scope TEXT, "
"project_id TEXT, "
"kind TEXT, "
"content TEXT, "
"source_thread_id TEXT, "
"status TEXT DEFAULT 'active', "
"superseded_by TEXT, "
"created_at DOUBLE PRECISION, "
"updated_at DOUBLE PRECISION)",
)