Update: 将子项目从 submodule 转为完整内容
- 移除 GovAI, nomifun-tauri, 算力盒子 的 submodule 引用 - 添加所有子项目的完整源代码 - 保留原始 .git 为 .git.bak 备份
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
-- Migration 003: Add system configuration table
|
||||
--
|
||||
-- Stores organization-level configuration including:
|
||||
-- - Organization name
|
||||
-- - Domain type (government/enterprise/education)
|
||||
-- - Initialization state
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- System configuration table
|
||||
------------------------------------------------------------------------
|
||||
|
||||
CREATE TABLE IF NOT EXISTS system_config (
|
||||
id INTEGER PRIMARY KEY CHECK (id = 1),
|
||||
organization_name TEXT NOT NULL DEFAULT 'My Organization',
|
||||
domain_type TEXT NOT NULL DEFAULT 'enterprise'
|
||||
CHECK(domain_type IN ('government', 'enterprise', 'education')),
|
||||
initialized INTEGER NOT NULL DEFAULT 0,
|
||||
init_completed_at INTEGER,
|
||||
created_at INTEGER NOT NULL,
|
||||
updated_at INTEGER NOT NULL
|
||||
);
|
||||
|
||||
-- Seed default configuration row
|
||||
INSERT OR IGNORE INTO system_config (id, created_at, updated_at)
|
||||
VALUES (1, unixepoch('now', 'subsec') * 1000, unixepoch('now', 'subsec') * 1000);
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Extend system_settings for additional preferences
|
||||
------------------------------------------------------------------------
|
||||
|
||||
ALTER TABLE system_settings ADD COLUMN theme_mode TEXT NOT NULL DEFAULT 'light'
|
||||
CHECK(theme_mode IN ('light', 'dark', 'auto'));
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- End of migration
|
||||
------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user