feat: add module_registry table (D110)
This commit is contained in:
parent
f0ff1ca374
commit
6491463eb9
25
persona-brain-db/schema/21-module-registry.sql
Normal file
25
persona-brain-db/schema/21-module-registry.sql
Normal file
@ -0,0 +1,25 @@
|
||||
-- ============================================================
|
||||
-- 表21:module_registry(Layer 2 · 模块注册表 · D110新增)
|
||||
-- 用途:所有模块的注册编号、接口协议、状态管理
|
||||
-- 开发完成→推代码仓库→注册编号→热插拔调用
|
||||
-- ============================================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS module_registry (
|
||||
module_id VARCHAR(32) PRIMARY KEY,
|
||||
module_name VARCHAR(128) NOT NULL,
|
||||
parent_id VARCHAR(32), -- 母编号
|
||||
owner VARCHAR(64), -- 开发者/成员
|
||||
interface_protocol TEXT, -- 接口协议描述
|
||||
repo_url TEXT, -- 代码仓库地址
|
||||
status VARCHAR(16) NOT NULL DEFAULT 'registered'
|
||||
CHECK (status IN (
|
||||
'registered', 'active', 'deprecated',
|
||||
'in_development', 'pending_review'
|
||||
)),
|
||||
version VARCHAR(16) NOT NULL DEFAULT 'v0.1',
|
||||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_mr_status ON module_registry(status);
|
||||
CREATE INDEX IF NOT EXISTS idx_mr_owner ON module_registry(owner);
|
||||
Loading…
x
Reference in New Issue
Block a user