Commit 42bba4e1 authored by Stephane Nicoll's avatar Stephane Nicoll

Document Liquibase default values

Closes gh-13765
parent c59f3121
...@@ -66,12 +66,12 @@ public class LiquibaseProperties { ...@@ -66,12 +66,12 @@ public class LiquibaseProperties {
/** /**
* Name of table to use for tracking change history. * Name of table to use for tracking change history.
*/ */
private String databaseChangeLogTable; private String databaseChangeLogTable = "DATABASECHANGELOG";
/** /**
* Name of table to use for tracking concurrent Liquibase usage. * Name of table to use for tracking concurrent Liquibase usage.
*/ */
private String databaseChangeLogLockTable; private String databaseChangeLogLockTable = "DATABASECHANGELOGLOCK";
/** /**
* Whether to first drop the database schema. * Whether to first drop the database schema.
......
...@@ -127,6 +127,22 @@ public class LiquibaseAutoConfigurationTests { ...@@ -127,6 +127,22 @@ public class LiquibaseAutoConfigurationTests {
.isEqualTo("classpath:/db/changelog/db.changelog-override.sql"))); .isEqualTo("classpath:/db/changelog/db.changelog-override.sql")));
} }
@Test
public void defaultValues() {
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
.run(assertLiquibase((liquibase) -> {
LiquibaseProperties properties = new LiquibaseProperties();
assertThat(liquibase.getDatabaseChangeLogTable())
.isEqualTo(properties.getDatabaseChangeLogTable());
assertThat(liquibase.getDatabaseChangeLogLockTable())
.isEqualTo(properties.getDatabaseChangeLogLockTable());
assertThat(liquibase.isDropFirst())
.isEqualTo(properties.isDropFirst());
assertThat(liquibase.isTestRollbackOnUpdate())
.isEqualTo(properties.isTestRollbackOnUpdate());
}));
}
@Test @Test
public void overrideContexts() { public void overrideContexts() {
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class) this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
......
...@@ -568,8 +568,8 @@ content into your application. Rather, pick only the properties that you need. ...@@ -568,8 +568,8 @@ content into your application. Rather, pick only the properties that you need.
spring.liquibase.default-schema= # Default database schema. spring.liquibase.default-schema= # Default database schema.
spring.liquibase.liquibase-schema= # Schema to use for Liquibase objects. spring.liquibase.liquibase-schema= # Schema to use for Liquibase objects.
spring.liquibase.liquibase-tablespace= # Tablespace to use for Liquibase objects. spring.liquibase.liquibase-tablespace= # Tablespace to use for Liquibase objects.
spring.liquibase.database-change-log-table= # Name of table to use for tracking change history. spring.liquibase.database-change-log-table=DATABASECHANGELOG # Name of table to use for tracking change history.
spring.liquibase.database-change-log-lock-table= # Name of table to use for tracking concurrent Liquibase usage. spring.liquibase.database-change-log-lock-table=DATABASECHANGELOGLOCK # Name of table to use for tracking concurrent Liquibase usage.
spring.liquibase.drop-first=false # Whether to first drop the database schema. spring.liquibase.drop-first=false # Whether to first drop the database schema.
spring.liquibase.enabled=true # Whether to enable Liquibase support. spring.liquibase.enabled=true # Whether to enable Liquibase support.
spring.liquibase.labels= # Comma-separated list of runtime labels to use. spring.liquibase.labels= # Comma-separated list of runtime labels to use.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment