chore(deps): 引入 Flyway 数据库迁移管理
新增内容: - 添加 flyway-core 依赖 (Spring Boot 2.7 管理版本 8.5.x) - 新增 FlywayConfig.java — 适配动态数据源,手动指定主数据源 - 排除 FlywayAutoConfiguration,使用自定义配置 - application-dev.yml 添加 spring.flyway 配置 - baseline-on-migrate: true (对现有表建立基线) - baseline-version: 0 - locations: classpath:db/migration - 新增 db/migration/V1__baseline_marker.sql 基线标记 - 新增 db/migration/README.md 使用说明 验证结果: - ✅ flyway_schema_history 表已创建 - ✅ 基线 (version=0) 已建立 - ✅ V1 迁移已执行 - ✅ 服务正常启动 使用方式: 后续新增表或修改表结构,在 db/migration/ 创建 V2__xxx.sql, V3__xxx.sql 等文件,启动时 Flyway 自动执行
This commit is contained in:
@@ -315,6 +315,7 @@
|
||||
<version>${flowable.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
|
||||
Reference in New Issue
Block a user