chore(db): 压缩 Flyway 迁移链为单基线

原 V1–V10 的净结构全部合并进 V1__flight_state_baseline.sql,迁移链收敛为一条。
表集合、逐列类型/非空/默认值、表级约束、索引与种子行经重放比对与旧链条一致;
仅丢弃 5 条只对既有库有意义的存量数据语句(RECEIVED_AT/ENQUEUED_AT 回填、
schd 与开放请求去重、SENT_AT 回写)。

已按旧链迁移过的库版本链与校验和对不上,必须重建 schema 或删除数据卷后重跑,
禁止手工 repair 或改写 flyway_schema_history。

- 删除 V2–V10 共 9 个迁移文件
- 注释统一范式并改用稳定 ID(INV-x/C-x/G-x),修正 KAFKA_MSG/KAFKA_SCHD 与实际值不符
- 同步 docs/reference.md、docs/user-stories.md、oracle11g/README.md、README、application.yml、compose.yaml
- FlywayMigrationTest 改为断言单基线,并补 MSG_EVENT.SENT_AT 覆盖
This commit is contained in:
windyboy
2026-09-13 16:31:14 +08:00
parent 62f61ad9e4
commit 800d7617f2
17 changed files with 163 additions and 356 deletions
+1 -1
View File
@@ -103,7 +103,7 @@
| 持久化与恢复 | `infra/persistence/``infra/retry/``ProcFailure` / `ReplayService` / `FailureScheduler` |
| 启停与配置 | `PipelineLifecycle.kt``config/PipelineProps.kt``config/HistoryProps.kt``config/OperationDayProps.kt`(含运营日时区启动自检) |
| 指标与健康 | `infra/metrics/PipelineMetrics.kt``infra/metrics/JobActivity.kt``infra/health/BacklogSnapshotProvider.kt``infra/health/JobRunnerHealthIndicator.kt` |
| 迁移 | `src/main/resources/db/migration/`V1 基线、V2 生命周期、V3 稳定处理起点、V4 回填闭环、V5 切流播种、V6 本地入队时间、V7 删除处理起点、V8 `REQ_TRACK` 开放态唯一索引、V9 `schd` 单行化`oracle11g/` 为占位) |
| 迁移 | `src/main/resources/db/migration/`单基线 `V1__flight_state_baseline.sql`:原 V1–V10 的净结构已合并,迁移链收敛为一条`oracle11g/` 为占位) |
## 4. 错误分类与重放白名单