chore(A10 W1): 收敛重复 bootstrap,db/migration 成平台表 DDL 单一真相
W1 引入 db/migration/V1-V3 后,平台表 DDL 在迁移与各模块 bootstrap-*.sql 重复
(评审揪出的"易漂移")。本次收敛,db/migration 成唯一真相:
- 删 3 份重复 bootstrap:bootstrap-page-schema(=V1)/bootstrap-datastatus(=V2)/
bootstrap-ai-agent(=V3)。三者无运行态 classpath 消费者(已全仓核实)。
- AiAgentDdlTest(platform-ai,原读 bootstrap-ai-agent.sql)删除,等价覆盖迁入
platform-app 新增 PlatformMigrationDdlGuardTest:① 守 V3 声明全部 AI 平台表/索引;
② 守 SchemaImportCli.CREATE_DDL ≡ V1(独立 CLI 兜底 DDL 防漂移)。
- SchemaImportCli.CREATE_DDL 由包私有改 public 供上述 guard 比对;两处过时注释改指 V1。
- ci.sh 平台表预灌改指 db/migration/V1(注:app 启动 Flyway 已幂等建表,此预灌仅冗余兜底)。
- docs 对齐:AI_AGENT_AUTO_DEVELOPMENT(spring.sql.init→Flyway)、docs/sql/SYS_PAGE_SCHEMA
/SYS_AI_AGENT 头注释(待办→已落地)、A10 design 残留收敛标完成、deploy/README 残留项标完成。
边界:platform-parity 的 bootstrap-{sys,privilege,auth,xservice,multidim,flow}.sql 是
eip3 schema 对拍测试 fixture,非平台表副本,原样保留。
验证:全 reactor mvn clean install 绿;PlatformMigrationDdlGuardTest 2/2;独立 code-reviewer
评审 GO(零 CRITICAL/HIGH/MEDIUM,含 guard substring 逻辑对真实 V1 仿真核实)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -38,7 +38,8 @@ docker compose -f deploy/docker-compose.yml logs -f platform-app
|
||||
## 三、待办(后续批次,见 A10 design)
|
||||
- **W5**:PG/Flowable 迁移 runbook 在准生产真跑 + 回退验证(含 flowable 引擎库 DDL 置备)。
|
||||
- **W6**:性能/并发基线 + nginx upstream 权重灰度切流(eip3↔eip4)。
|
||||
- **残留收敛**:删除与 `db/migration` 重复的 `bootstrap-*.sql`,把 `ci.sh`/`AiAgentDdlTest`/对拍 fixture 指向 `db/migration`(app 运行态已单源,独立工具仍用 bootstrap)。
|
||||
|
||||
> ✅ **残留收敛已完成(2026-06-25)**:与 `db/migration` 重复的 3 份 `bootstrap-*.sql`(page-schema/datastatus/ai-agent)已删;`ci.sh` 改指 `db/migration/V1`;`AiAgentDdlTest` 迁入 platform-app 守 V3;`SchemaImportCli` 内联 DDL 经 `PlatformMigrationDdlGuardTest` 钉死 ≡ V1。db/migration 为平台表 DDL 唯一真相。
|
||||
|
||||
## 验证状态(诚实记录,2026-06-25 本地真验)
|
||||
- ✅ `docker build` 两镜像通过:`platform-app` 727MB / `flowable` 641MB(JRE21 + 非 root + COPY 预构建 jar)。
|
||||
|
||||
Reference in New Issue
Block a user