Liquibase Parameters for MongoDB

You can control the way Liquibase behaves when running commands on your MongoDB database by setting Liquibase parameters. For example, you can use them to configure OIDC authentication on MongoDB Atlas.

For a list of general Liquibase parameters, see Liquibase Parameters.

For more information about MongoDB, see Using Liquibase MongoDB Pro with MongoDB Platforms.

List of parameters

Note: Syntax for each parameter is specified in kebab-case (CLI and flow file), camelCase (properties file and JAVA_OPTS), and MACRO_CASE (environment variable).

Tip: For best results, specify all commands and parameters in the --kebab-case format in the CLI. If your preference is camelCase, it also works in the CLI.

Name (--cli, {flow-file}, propertiesFile, ENV_VAR) Type Description
--mongodb-adjust-tracking-tables-on-startup
globalArgs: {adjust-tracking-tables-on-startup: "val"}
liquibase.mongodb.adjustTrackingTablesOnStartup
LIQUIBASE_MONGODB_ADJUST_TRACKING_TABLES_ON_STARTUP

Read more: --mongodb-adjust-tracking-tables-on-startup

Boolean

Validates the Liquibase DATABASECHANGELOG and DATABASECHANGELOGLOCK collections on startup. If they are not up to date with the current release, Liquibase adjusts them. It is a best practice to keep this parameter enabled whenever you upgrade to a new Liquibase version. Default: true.

--mongodb-oidc-authentication-mechanism
globalArgs: {mongodb-oidc-authentication-mechanism: "val"}
liquibase.mongodb.oidc.authenticationMechanism
LIQUIBASE_MONGODB_OIDC_AUTHENTICATION_MECHANISM

Read more: --mongodb-oidc-authentication-mechanism

String

Authentication mechanism for MongoDB. Valid values are: MONGODB-OIDC. If no value is specified, Liquibase tries to connect using a username and password. For more information, see MongoDB: Enterprise Authentication Mechanisms.

--mongodb-oidc-environment
globalArgs: {mongodb-oidc-environment: "val"}
liquibase.mongodb.oidc.environment
LIQUIBASE_MONGODB_OIDC_ENVIRONMENT

Read more: --mongodb-oidc-environment

String

Cloud provider environment for OIDC authentication. Valid values are: azure. Required if --mongodb-oidc-authentication-mechanism is specified.

--mongodb-oidc-oidc-application-id-uri
globalArgs: {mongodb-oidc-oidc-application-id-uri: "val"}
liquibase.mongodb.oidc.oidcApplicationIDURI
LIQUIBASE_MONGODB_OIDC_OIDC_APPLICATION_ID_URI

Read more: --mongodb-oidc-oidc-application-id-uri

String

Application ID URI used for OIDC authentication in cloud providers. For example, with Azure: api://8d719796-c744-4352-aab9-47a52c363907. Required if --mongodb-oidc-authentication-mechanism is specified.

--mongodb-oidc-oidc-client-id
globalArgs: {mongodb-oidc-oidc-client-id: "val"}
liquibase.mongodb.oidc.oidcClientID
LIQUIBASE_MONGODB_OIDC_OIDC_CLIENT_ID

Read more: --mongodb-oidc-oidc-client-id

String

Client ID of the User-Assigned Identity for OIDC authentication.

--mongodb-retry-writes
globalArgs: {retry-writes: "val"}
liquibase.mongodb.retryWrites
LIQUIBASE_MONGODB_RETRY_WRITES

Read more: --mongodb-retry-writes

Boolean

Specifies whether to retry write operations a single time after a failed write. If true, Liquibase appends retryWrites=true to the connection URL. If false, Liquibase appends retryWrites=false. Setting this parameter to false permits Liquibase usage on MongoDB versions not supporting retryWrites, like Amazon DocumentDB. Default: true.

--mongodb-supports-validator
globalArgs: {supports-validator: "val"}
liquibase.mongodb.supportsValidator
LIQUIBASE_MONGODB_SUPPORTS_VALIDATOR

Read more: --mongodb-supports-validator

Boolean

Specifies whether to create the Liquibase tracking collections with validators. Setting this parameter to false permits usage on MongoDB versions not supporting validators. Default: true.