wsh5485
|
d7dab31f19
|
docs: add table prefix migration task (21 CarLog tables)
按用户决定「i系统内的carlog数据库表要加carlog_前缀」:
- 之前方案是「留给将来加第二个子系统时」, 现在提前做
- 新增 Task 2.8 表前缀迁移 (含 5 个子节 + review checklist)
- DEV-PLAN.md:
- 关键决策表「本阶段不做」→「本阶段做」
- 加 Task 2.8: 备份 + migration 020 + 改 server SQL + reset-all.js + 验证
- 加 §6.2.11 表前缀迁移 review checklist (10 项)
- 「不做的事」: 删掉表前缀
- 「完成定义」: 加 Task 2.8
- ARCHITECTURE.md:
- §3 决策表同步
- §7 W2 改成完整 RENAME TABLE 21 张 + 备份警告
- 删掉过时的 db.js tableName helper 建议
- README.md:
- 决策表同步
- 实施路线按 Phase 1 / 2 / 2.8 / 3 重新分组
- 删掉「暂不做: CarLog 表前缀」
迁移策略:
- 21 张 CarLog 业务表加 carlog_ 前缀 (含 carlog_settings)
- 5 张共享表不动 (users / login_attempts / auth_locks / schema_migrations / 平台表)
- 改前必做 mysqldump 备份 (RENAME 是 DDL 不能事务回滚)
- 直接改 SQL (不加 helper 函数, 20 张表工作量可控)
- sed \\b word boundary 安全替换 (列了完整 21 张表清单, 不动共享表 4 张)
|
2026-06-20 23:06:12 +08:00 |
|
wsh5485
|
65b0bb04f8
|
feat: import CarLog v2.8 code + dev plan
把 CarLog v2.8 全套源码 + 配置导入到 i 仓库作为 baseline:
- server/src/ (13 个路由 + middleware + services + config)
- server/migrations/ (0001~0018 共 18 个迁移 + mysql)
- server/test/ (12 文件 101 测试)
- client/src/ (20 个 view + components + stores + api + composables)
- client/public/ + client/scripts/
- 全部配置文件 (.editorconfig, .eslintrc.json, .prettierrc.json, vitest.config.js, lighthouserc.json, .pa11yci.json, package.json, carlog-init.sql)
- .husky/pre-commit (git hooks)
- docs/install/ (宝塔部署文档)
不含:
- node_modules/ (本地 npm install)
- .env (敏感, 走 .env.example)
- *.zip / *.log / *.sqlite / .DS_Store
新增文档 docs/DEV-PLAN.md:
- Phase 1: 平台基座 (019 migration + 3 个 platform 路由 + 3 个 view)
- Phase 2: CarLog 子系统化 (后端 routes/ → subsystems/carlog/ + 前端 views/ → views/subsystems/carlog/ + 元数据驱动菜单)
- Phase 3: 验证 (测试 + E2E + DB 完整性)
- 交付清单 + commit 模板 + 给 Mavis review 的材料
后续 Trae 实施, 提交后我 code review + 跑测试。
|
2026-06-20 22:30:19 +08:00 |
|