refactor: 迁移脚本系统重构 + 新增 db 脚本 + 工作日志
- 清理全部旧迁移文件(0000-0011)和 meta 目录 - 使用 drizzle-kit generate 从 schema 重新生成单一迁移文件 - 0000_perfect_pestilence.sql: 包含全部 49 张表 - 修复 0011_ai_providers.sql 未在 journal 注册导致 migrate 失败的问题 - 修复缺少 snapshot 文件的问题 - 移除复杂 PREPARE/EXECUTE 条件 SQL,使用标准 CREATE TABLE - package.json 新增脚本: - db:create: 创建数据库 - db:push: 直接同步 schema(开发用) - db:setup: 一键 create → migrate → seed - 干净数据库全流程测试通过: create → migrate → seed - 更新工作日志(docs/work_log.md)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,79 +5,9 @@
|
||||
{
|
||||
"idx": 0,
|
||||
"version": "5",
|
||||
"when": 1766460456274,
|
||||
"tag": "0000_aberrant_cobalt_man",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 1,
|
||||
"version": "5",
|
||||
"when": 1767004087964,
|
||||
"tag": "0001_flawless_texas_twister",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 2,
|
||||
"version": "5",
|
||||
"when": 1767145757594,
|
||||
"tag": "0002_equal_wolfpack",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 3,
|
||||
"version": "5",
|
||||
"when": 1767166769676,
|
||||
"tag": "0003_petite_newton_destine",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 4,
|
||||
"version": "5",
|
||||
"when": 1767169003334,
|
||||
"tag": "0004_add_chapter_content_and_kp_chapter",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 5,
|
||||
"version": "5",
|
||||
"when": 1767751916045,
|
||||
"tag": "0005_add_class_school_subject_teachers",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 6,
|
||||
"version": "5",
|
||||
"when": 1767760693171,
|
||||
"tag": "0006_faithful_king_bedlam",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 7,
|
||||
"version": "5",
|
||||
"when": 1768205524480,
|
||||
"tag": "0007_talented_bromley",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 8,
|
||||
"version": "5",
|
||||
"when": 1768470966367,
|
||||
"tag": "0008_thin_madrox",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 9,
|
||||
"version": "5",
|
||||
"when": 1772162908476,
|
||||
"tag": "0009_smart_mephistopheles",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 10,
|
||||
"version": "5",
|
||||
"when": 1772439600000,
|
||||
"tag": "0010_subject_id_switch",
|
||||
"when": 1781676504560,
|
||||
"tag": "0000_perfect_pestilence",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user