Skip to content

Commit

Permalink
Standardized naming of "changelog" and "changeset" as one word in con…
Browse files Browse the repository at this point in the history
…figuration properties

LB-1222
  • Loading branch information
nvoxland committed Apr 6, 2021
1 parent 02a3949 commit c0d97bc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
22 changes: 14 additions & 8 deletions liquibase-core/src/main/java/liquibase/GlobalConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,26 @@ public class GlobalConfiguration implements AutoloadedConfigurations {
.addAliasKey("should.run")
.build();

DATABASECHANGELOG_TABLE_NAME = builder.define("databaseChangeLogTableName", String.class)
DATABASECHANGELOG_TABLE_NAME = builder.define("databaseChangelogTableName", String.class)
.addAliasKey("liquibase.databaseChangeLogTableName")
.setDescription("Name of table to use for tracking change history")
.setDefaultValue("DATABASECHANGELOG")
.build();

DATABASECHANGELOGLOCK_TABLE_NAME = builder.define("databaseChangeLogLockTableName", String.class)
DATABASECHANGELOGLOCK_TABLE_NAME = builder.define("databaseChangelogLockTableName", String.class)
.addAliasKey("liquibase.databaseChangeLogLockTableName")
.setDescription("Name of table to use for tracking concurrent Liquibase usage")
.setDefaultValue("DATABASECHANGELOGLOCK")
.build();

CHANGELOGLOCK_WAIT_TIME = builder.define("changeLogLockWaitTimeInMinutes", Long.class)
CHANGELOGLOCK_WAIT_TIME = builder.define("changelogLockWaitTimeInMinutes", Long.class)
.addAliasKey("liquibase.changeLogLockWaitTimeInMinutes")
.setDescription("Number of minutes to wait for the changelog lock to be available before giving up")
.setDefaultValue(5L)
.build();

CHANGELOGLOCK_POLL_RATE = builder.define("changeLogLockPollRate", Long.class)
CHANGELOGLOCK_POLL_RATE = builder.define("changelogLockPollRate", Long.class)
.addAliasKey("liquibase.changeLogLockPollRate")
.setDescription("Number of seconds wait between checks to the changelog lock when it is locked")
.setDefaultValue(10L)
.build();
Expand Down Expand Up @@ -88,8 +92,9 @@ public class GlobalConfiguration implements AutoloadedConfigurations {
.setDefaultValue(true)
.build();

GENERATE_CHANGESET_CREATED_VALUES = builder.define("generateChangeSetCreatedValues", Boolean.class)
.setDescription("Should Liquibase include a 'created' attribute in diff/generateChangeLog changeSets with" +
GENERATE_CHANGESET_CREATED_VALUES = builder.define("generateChangesetCreatedValues", Boolean.class)
.addAliasKey("liquibase.generateChangeSetCreatedValues")
.setDescription("Should Liquibase include a 'created' attribute in diff/generateChangelog changesets with" +
" the current datetime")
.setDefaultValue(false)
.build();
Expand All @@ -110,8 +115,9 @@ public class GlobalConfiguration implements AutoloadedConfigurations {
.build();


GENERATED_CHANGESET_IDS_INCLUDE_DESCRIPTION = builder.define("generatedChangeSetIdsContainsDescription", Boolean.class)
.setDescription("Should Liquibase include the change description in the id when generating changeSets?")
GENERATED_CHANGESET_IDS_INCLUDE_DESCRIPTION = builder.define("generatedChangesetIdsContainsDescription", Boolean.class)
.addAliasKey("liquibase.generatedChangeSetIdsContainsDescription")
.setDescription("Should Liquibase include the change description in the id when generating changesets?")
.setDefaultValue(false)
.build();

Expand Down
7 changes: 7 additions & 0 deletions liquibase-core/src/main/java/liquibase/util/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,13 @@ public static String randomIdentifer(int len) {
return sb.toString();
}

/**
* Converts a camelCase string to a kabob-case one
*/
public static String toKabobCase(String string) {
return string.replaceAll("([A-Z])", "-$1").toLowerCase();
}

public interface StringUtilFormatter<Type> {
String toString(Type obj);
}
Expand Down

0 comments on commit c0d97bc

Please sign in to comment.