可以在 Liquibase 中更改 DATABASECHANGELOGLOCK table 的名称吗?

It is possible to change the name of the DATABASECHANGELOGLOCK table in Liquibase?

可以在 Liquibase 中更改 DATABASECHANGELOGLOCK table 的名称吗?

我希望它可以在application.yml文件中,但我在文档中没有找到这样的属性: https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html

您可以通过传递名为 liquibase.databaseChangeLogLockTableName 的 JVM 系统 属性 来更改 Liquibase 的 'log lock' table 名称的值。例如:

-Dliquibase.databaseChangeLogLockTableName=MY_LOG_LOCK_TABLE_NAME

Spring Boot 与 Liquibase 的集成不支持此 属性,因此您不能将其定义为 Spring 属性 并让 Spring Boot 传播它到 Liquibase。 Spring Boot 支持的 Liquibase 属性列在 here 中,但您已经发现了这些。直到 Spring Boot 支持传播这个 属性 我认为你必须通过命令行提供它。

FWIW,Liquibase 的 Maven 插件通过可选参数支持这一点:databaseChangeLogLockTableName。更多详情 in the docs.