fix(flyway): 各服务配置独立历史表名,解决共享数据库冲突

私有化部署所有服务共用同一 MySQL 库,Flyway 默认都写
flyway_schema_history,导致不同服务的 V1 checksum 互相
覆盖/冲突。改为每个服务使用独立的表名:
flyway_history_{tenant|im|file|update|license|push|demo}

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
这个提交包含在:
XuqmGroup 2026-06-13 00:05:31 +08:00
父节点 200f8ae54a
当前提交 ffdb7c56fe
共有 7 个文件被更改,包括 7 次插入0 次删除

查看文件

@ -34,6 +34,7 @@ spring:
baseline-on-migrate: true baseline-on-migrate: true
baseline-version: 0 baseline-version: 0
locations: classpath:db/migration locations: classpath:db/migration
table: flyway_history_demo
jwt: jwt:
secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac} secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac}

查看文件

@ -39,6 +39,7 @@ spring:
baseline-on-migrate: true baseline-on-migrate: true
baseline-version: 0 baseline-version: 0
locations: classpath:db/migration locations: classpath:db/migration
table: flyway_history_file
jwt: jwt:
secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac} secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac}

查看文件

@ -43,6 +43,7 @@ spring:
baseline-on-migrate: true baseline-on-migrate: true
baseline-version: 0 baseline-version: 0
locations: classpath:db/migration locations: classpath:db/migration
table: flyway_history_im
jwt: jwt:
secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac} secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac}

查看文件

@ -31,6 +31,7 @@ spring:
baseline-on-migrate: true baseline-on-migrate: true
baseline-version: 0 baseline-version: 0
locations: classpath:db/migration locations: classpath:db/migration
table: flyway_history_license
jwt: jwt:
secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac} secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac}

查看文件

@ -24,6 +24,7 @@ spring:
baseline-on-migrate: true baseline-on-migrate: true
baseline-version: 0 baseline-version: 0
locations: classpath:db/migration locations: classpath:db/migration
table: flyway_history_push
jwt: jwt:
secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac} secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac}

查看文件

@ -57,6 +57,7 @@ spring:
baseline-on-migrate: true baseline-on-migrate: true
baseline-version: 0 baseline-version: 0
locations: classpath:db/migration locations: classpath:db/migration
table: flyway_history_tenant
jwt: jwt:
secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac} secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac}

查看文件

@ -28,6 +28,7 @@ spring:
baseline-on-migrate: true baseline-on-migrate: true
baseline-version: 0 baseline-version: 0
locations: classpath:db/migration locations: classpath:db/migration
table: flyway_history_update
jwt: jwt:
secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac} secret: ${XUQM_JWT_SECRET:xuqm-tenant-service-secret-key-must-be-at-least-256-bits-long-for-hmac}