铸渊 ICE-GL-ZY001 02a12c2d58
Some checks failed
自动更新代码和重启 / update-and-restart (push) Has been cancelled
CI检查 + 自动部署 / check (push) Has been cancelled
CI检查 + 自动部署 / deploy (push) Has been cancelled
D123+ persona-brain-db 本地化: 25个SQL Schema + import_notion.py
- 21张表完整Schema + init.sql + 3个种子数据文件
- import_notion.py: Notion Markdown导出→documents表导入器
- brain.db本地已建(1.5MB): 137页+完整树形结构(最深11层)
- 种子数据: 13公理·34核心原则·49条原则·12人格体
- 待追加: 第五域剩余分区导出
2026-06-04 16:22:10 +08:00

49 lines
1.9 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- ============================================================
-- persona-brain-db · 一键建表脚本D110完整版 · 21张表
-- 执行方式sqlite3 brain.db < init.sql
-- ============================================================
-- 启用外键约束
PRAGMA foreign_keys = ON;
-- ============ Layer 1: DB OS Kernelinit时创建并填充 ============
.read 06-system-core-principles.sql
.read 07-system-causal-chains.sql
.read 09-system-language-membrane.sql
.read 10-system-public-key.sql
.read 11-system-protocols.sql
.read 17-system-axioms.sql
.read 18-system-trinity.sql
-- ============ Layer 2: Persona Data Tables运行时数据 ============
.read 01-persona-identity.sql
.read 02-persona-cognition.sql
.read 03-persona-memory.sql
.read 04-dev-profiles.sql
.read 05-agent-registry.sql
.read 08-emotional-state.sql
.read 15-access-grants.sql
.read 16-documents.sql
.read 19-persona-growth-records.sql
.read 20-member-context.sql
.read 21-module-registry.sql
-- ============ Layer 3: Audit & Access Controlappend-only ============
.read 12-audit-log-national.sql
.read 13-audit-log-user.sql
.read 14-audit-log-guanghu.sql
-- ============ Layer 1 种子数据 ============
-- v1.2: D110完整版 · 公理集 + 三位一体 + 完整思维规律
.read seed-layer1-v2.sql
-- v2-patch: 补全语言膜/公钥/协议 + 旧版原则归档
.read seed-layer1-v2-patch.sql
-- ============ 建表完成提示 ============
SELECT '✅ persona-brain-db 全部21张表 + 完整种子数据D110' AS result;
SELECT ' system层: axioms, core_principles, causal_chains, language_membrane, public_key, protocols, trinity' AS layer1;
SELECT ' persona层: identity, cognition, memory, dev_profiles, agent_registry, emotional_state, access_grants, documents, growth_records, member_context, module_registry' AS layer2;
SELECT ' audit层: national, user, guanghu' AS layer3;