feat: add member_context table (D110)
This commit is contained in:
parent
01cb4d4cf0
commit
f0ff1ca374
19
persona-brain-db/schema/20-member-context.sql
Normal file
19
persona-brain-db/schema/20-member-context.sql
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
-- ============================================================
|
||||||
|
-- 表20:member_context(Layer 2 · 成员上下文 · D110新增)
|
||||||
|
-- 用途:每个成员/开发人格体自己的上下文空间
|
||||||
|
-- ============================================================
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS member_context (
|
||||||
|
member_id VARCHAR(32) PRIMARY KEY,
|
||||||
|
member_name VARCHAR(64) NOT NULL,
|
||||||
|
domain VARCHAR(64), -- 领域/负责范围
|
||||||
|
brain_version VARCHAR(16), -- 当前共享大脑版本
|
||||||
|
last_wake_time TIMESTAMP,
|
||||||
|
current_project TEXT,
|
||||||
|
status VARCHAR(16) NOT NULL DEFAULT 'active'
|
||||||
|
CHECK (status IN ('active', 'inactive', 'onboarding')),
|
||||||
|
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE INDEX IF NOT EXISTS idx_mc_status ON member_context(status);
|
||||||
Loading…
x
Reference in New Issue
Block a user