feat(A10 W1): Flyway 平台表迁移单一真相(本地 PG 真验)
platform-app 加 flyway-core+flyway-database-postgresql(10.10.0,Boot BOM 管版本);db/migration/V1__sys_page_schema/V2__sys_datastatus/V3__sys_ai_agent(DDL 从既有幂等 bootstrap 迁入,V2 去测试种子行);application.yml 启 Flyway(baseline-on-migrate + baseline-version=0,只管 EIP4 新增 SYS_* 平台表,不碰客户业务表);dev/local 的 spring.sql.init 收敛移除→app 运行态 provisioning 单一走 Flyway。FlywayMigrationLocalIT 对真实 PostgreSQL 15.18 验:①全新 schema→V1-V3 建全表+幂等;②既有非空 schema(已有 sys_page_schema+数据)→baseline V0→V1-V3 幂等应用、既有行不破坏(=客户库接管)。docker build 两镜像真验过(daemon 已起)。全 reactor mvn clean install 绿(无 surefire @SpringBootTest 受 Flyway 影响)。残留 follow-up:bootstrap-*.sql(ci.sh/AiAgentDdlTest/parity fixture 用)与 db/migration 文档级重复,全收敛(删 bootstrap/ci.sh repoint)后续。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
<!-- 可观测性(总览 §10.2):仅 /actuator/health(含 liveness/readiness 探针),不上 Prometheus 全家桶 -->
|
||||
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency>
|
||||
<dependency><groupId>org.postgresql</groupId><artifactId>postgresql</artifactId><scope>runtime</scope></dependency>
|
||||
<!-- A10 W1:平台表迁移单一真相(db/migration);Flyway 10.x 拆库支持,PG 需 flyway-database-postgresql。版本由 Spring Boot BOM 管 -->
|
||||
<dependency><groupId>org.flywaydb</groupId><artifactId>flyway-core</artifactId></dependency>
|
||||
<dependency><groupId>org.flywaydb</groupId><artifactId>flyway-database-postgresql</artifactId></dependency>
|
||||
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency>
|
||||
<!-- 模块边界纪律:ArchUnit 规则跑在能看到全部类的 app 模块测试里 -->
|
||||
<dependency><groupId>com.tngtech.archunit</groupId><artifactId>archunit-junit5</artifactId><scope>test</scope></dependency>
|
||||
|
||||
Reference in New Issue
Block a user