Configuration Reference

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

Whether Flyway-MongoDB is enabled during the build.

If Flyway-MongoDB is disabled, the Flyway-MongoDB beans won’t be created and Flyway won’t be usable.

Environment variable: QUARKUS_FLYWAY_MONGODB_ENABLED

boolean

true

Per-MongoDB-client configuration

Type

Default

quarkus.flyway-mongodb."mongo-client-name".locations

Comma-separated list of locations to scan recursively for migrations. The location type is determined by its prefix.

Unprefixed locations or locations starting with classpath: point to a package on the classpath and may contain both JavaScript and JSON-based migrations.

Locations starting with filesystem: point to a directory on the filesystem, may only contain migration scripts and are only scanned recursively down non-hidden directories.

Environment variable: QUARKUS_FLYWAY_MONGODB_LOCATIONS

list of string

db/migration

quarkus.flyway-mongodb."mongo-client-name".migration-suffixes

Comma-separated list of file suffixes to recognize as migration scripts. Defaults to .js. Set to .json to use JSON-format migrations instead; JSON migrations do not require mongosh to be installed. The flyway-database-nc-mongodb connector does not support mixing .js and .json migrations in the same project.

Environment variable: QUARKUS_FLYWAY_MONGODB_MIGRATION_SUFFIXES

list of string

.js

quarkus.flyway-mongodb."mongo-client-name".active

Flag to activate/deactivate Flyway for a specific MongoDB client at runtime.

Environment variable: QUARKUS_FLYWAY_MONGODB_ACTIVE

boolean

'true' if the MongoDB client is active; 'false' otherwise

quarkus.flyway-mongodb."mongo-client-name".connect-retries

The maximum number of retries when attempting to connect to the database.

After each failed attempt, Flyway will wait up to the configured connect-retries-interval duration before attempting to connect again, up to the maximum number of times specified by connectRetries.

Environment variable: QUARKUS_FLYWAY_MONGODB_CONNECT_RETRIES

int

quarkus.flyway-mongodb."mongo-client-name".connect-retries-interval

The maximum time between retries when attempting to connect to the database.

This will cap the interval between connect retries to the value provided.

Environment variable: QUARKUS_FLYWAY_MONGODB_CONNECT_RETRIES_INTERVAL

Duration 

120 seconds

quarkus.flyway-mongodb."mongo-client-name".connection-string

Optional override for the connection string Flyway uses. Defaults to the corresponding quarkus.mongodb.<client>.connection-string.

Environment variable: QUARKUS_FLYWAY_MONGODB_CONNECTION_STRING

string

quarkus.flyway-mongodb."mongo-client-name".database

Target database for migrations. Defaults to the corresponding quarkus.mongodb.<client>.database.

Environment variable: QUARKUS_FLYWAY_MONGODB_DATABASE

string

quarkus.flyway-mongodb."mongo-client-name".collection

Schema history collection name.

Environment variable: QUARKUS_FLYWAY_MONGODB_COLLECTION

string

quarkus.flyway-mongodb."mongo-client-name".migration-prefix

The file name prefix for versioned migrations. Versioned migrations have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix, which using the defaults translates to V1.1__My_description.js

Environment variable: QUARKUS_FLYWAY_MONGODB_MIGRATION_PREFIX

string

quarkus.flyway-mongodb."mongo-client-name".repeatable-migration-prefix

The file name prefix for repeatable migrations. Repeatable migrations have the following file name structure: prefixSeparatorDESCRIPTIONsuffix, which using the defaults translates to R__My_description.js

Environment variable: QUARKUS_FLYWAY_MONGODB_REPEATABLE_MIGRATION_PREFIX

string

quarkus.flyway-mongodb."mongo-client-name".clean-at-start

true to execute Flyway clean command automatically when the application starts, false otherwise.

Environment variable: QUARKUS_FLYWAY_MONGODB_CLEAN_AT_START

boolean

`false`

quarkus.flyway-mongodb."mongo-client-name".clean-disabled

true to prevent Flyway clean operations, false otherwise.

Environment variable: QUARKUS_FLYWAY_MONGODB_CLEAN_DISABLED

boolean

false

quarkus.flyway-mongodb."mongo-client-name".migrate-at-start

true to execute Flyway automatically when the application starts, false otherwise.

Environment variable: QUARKUS_FLYWAY_MONGODB_MIGRATE_AT_START

boolean

false

quarkus.flyway-mongodb."mongo-client-name".repair-at-start

true to execute a Flyway repair command when the application starts, false otherwise.

Environment variable: QUARKUS_FLYWAY_MONGODB_REPAIR_AT_START

boolean

false

quarkus.flyway-mongodb."mongo-client-name".validate-at-start

true to execute a Flyway validate command when the application starts, false otherwise.

Environment variable: QUARKUS_FLYWAY_MONGODB_VALIDATE_AT_START

boolean

false

quarkus.flyway-mongodb."mongo-client-name".validate-at-start.clean-on-validation-error

true to automatically execute a Flyway clean command when a validation error occurs at start, false otherwise.

Environment variable: QUARKUS_FLYWAY_MONGODB_VALIDATE_AT_START_CLEAN_ON_VALIDATION_ERROR

boolean

false

quarkus.flyway-mongodb."mongo-client-name".baseline-on-migrate

true to execute Flyway baseline before migrations. This flag is ignored if the flyway_schema_history collection already exists. Note that this will not automatically call migrate, you must either enable baselineAtStart or programmatically call flyway.migrate().

Environment variable: QUARKUS_FLYWAY_MONGODB_BASELINE_ON_MIGRATE

boolean

false

quarkus.flyway-mongodb."mongo-client-name".baseline-at-start

true to execute Flyway baseline automatically when the application starts. This flag is ignored if the flyway_schema_history collection already exists. Note: this does not also call migrate; pair with migrate-at-start if needed.

Environment variable: QUARKUS_FLYWAY_MONGODB_BASELINE_AT_START

boolean

false

quarkus.flyway-mongodb."mongo-client-name".baseline-version

The initial baseline version.

Environment variable: QUARKUS_FLYWAY_MONGODB_BASELINE_VERSION

string

quarkus.flyway-mongodb."mongo-client-name".baseline-description

The description to tag an existing schema with when executing baseline.

Environment variable: QUARKUS_FLYWAY_MONGODB_BASELINE_DESCRIPTION

string

quarkus.flyway-mongodb."mongo-client-name".validate-on-migrate

Whether to automatically call validate when performing a migration.

Environment variable: QUARKUS_FLYWAY_MONGODB_VALIDATE_ON_MIGRATE

boolean

true

quarkus.flyway-mongodb."mongo-client-name".out-of-order

Allows migrations to be run "out of order".

Environment variable: QUARKUS_FLYWAY_MONGODB_OUT_OF_ORDER

boolean

false

quarkus.flyway-mongodb."mongo-client-name".ignore-missing-migrations

Ignore missing migrations when reading the history table. When set to true migrations from older versions present in the history table but absent in the configured locations will be ignored (and logged as a warning), when false (the default) the validation step will fail.

Environment variable: QUARKUS_FLYWAY_MONGODB_IGNORE_MISSING_MIGRATIONS

boolean

false

quarkus.flyway-mongodb."mongo-client-name".ignore-future-migrations

Ignore future migrations when reading the history table. When set to true migrations from newer versions present in the history table but absent in the configured locations will be ignored (and logged as a warning), when false (the default) the validation step will fail.

Environment variable: QUARKUS_FLYWAY_MONGODB_IGNORE_FUTURE_MIGRATIONS

boolean

false

quarkus.flyway-mongodb."mongo-client-name".placeholders."placeholder-key"

Sets the placeholders to replace in migration scripts.

Environment variable: QUARKUS_FLYWAY_MONGODB_PLACEHOLDERS__PLACEHOLDER_KEY_

Map<String,String>

quarkus.flyway-mongodb."mongo-client-name".placeholder-prefix

Prefix of every placeholder (default: ${ )

Environment variable: QUARKUS_FLYWAY_MONGODB_PLACEHOLDER_PREFIX

string

quarkus.flyway-mongodb."mongo-client-name".placeholder-suffix

Suffix of every placeholder (default: } )

Environment variable: QUARKUS_FLYWAY_MONGODB_PLACEHOLDER_SUFFIX

string

quarkus.flyway-mongodb."mongo-client-name".validate-migration-naming

Whether to validate migrations and callbacks whose scripts do not obey the correct naming convention. A failure can be useful to check that errors such as case sensitivity in migration prefixes have been corrected.

Environment variable: QUARKUS_FLYWAY_MONGODB_VALIDATE_MIGRATION_NAMING

boolean

false

quarkus.flyway-mongodb."mongo-client-name".ignore-migration-patterns

Ignore migrations during validate and repair according to a given list of patterns. When this configuration is set, the ignoreFutureMigrations and ignoreMissingMigrations settings are ignored. Patterns are comma separated.

Environment variable: QUARKUS_FLYWAY_MONGODB_IGNORE_MIGRATION_PATTERNS

list of string

About the Duration format

To write duration values, use the standard java.time.Duration format. See the Duration#parse() Java API documentation for more information.

You can also use a simplified format, starting with a number:

  • If the value is only a number, it represents time in seconds.

  • If the value is a number followed by ms, it represents time in milliseconds.

In other cases, the simplified format is translated to the java.time.Duration format for parsing:

  • If the value is a number followed by h, m, or s, it is prefixed with PT.

  • If the value is a number followed by d, it is prefixed with P.