使用Spring Boot重命名Liquibase changelog表 [英] Rename Liquibase changelog tables with spring boot

查看:387
本文介绍了使用Spring Boot重命名Liquibase changelog表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Liquibase(v 3.5.3) Spring Boot(v 1.5.3).

我想使用Spring Boot属性文件更改liquibase changelog表名称.

I want to change liquibase changelog tables names using spring boot properties file.

我发现这样做的唯一方法是设置 liquibase.databaseChangeLogTableName liquibase.databaseChangeLogLockTableName 系统属性以覆盖默认表名.

The only way I found to do this is setting liquibase.databaseChangeLogTableName and liquibase.databaseChangeLogLockTableName system properties to override default table names.

是否有其他方法可以使用Spring Boot属性文件而不是设置系统属性来覆盖默认的liquibase表名称?

Is there any alternative way to override default liquibase table names using spring boot properties file instead of setting system properties?

推荐答案

由于这是1岁,但仍然是我针对此问题发现的第一个Google结果:

Since this is 1 year old and still the first google result i found for this question:

适用于大约Spring Boot 2.1.x( https://github.com /spring-projects/spring-boot/issues/15544 最后一个响应)设置这些属性对我有用:

For around spring boot 2.1.x (https://github.com/spring-projects/spring-boot/issues/15544 last response) setting those properties works for me:

spring.liquibase.database-change-log-lock-table=MY_CUSTOM_DATABASECHANGELOGLOCK
spring.liquibase.database-change-log-table=MY_CUSTOM_DATABASECHANGELOG

这篇关于使用Spring Boot重命名Liquibase changelog表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆