Package io.quarkus.flyway.runtime
Class FlywayDataSourceRuntimeConfig
java.lang.Object
io.quarkus.flyway.runtime.FlywayDataSourceRuntimeConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionFlag to activate/deactivate Flyway for a specific datasource at runtime.booleantrue to execute Flyway baseline automatically when the application starts.The description to tag an existing schema with when executing baseline.booleantrue to execute Flyway baseline before migrations This flag is ignored if the flyway_schema_history table exists in the current schema or if the current schema is empty.The initial baseline version.booleantrue to execute Flyway clean command automatically when the application starts, false otherwise.booleantrue to prevent Flyway clean operations, false otherwise.booleantrue to automatically call clean when a validation error occurs, false otherwise.The maximum number of retries when attempting to connect to the database.The maximum time between retries when attempting to connect to the database.booleanWhether Flyway should attempt to create the schemas specified in the schemas propertySets the default schema managed by Flyway.booleanIgnore future migrations when reading the history table.Ignore migrations during validate and repair according to a given list of patterns (see https://flywaydb.org/documentation/configuration/parameters/ignoreMigrationPatterns for more information).booleanIgnore missing migrations when reading the history table.The SQL statements to run to initialize a new database connection immediately after opening it.The JDBC URL that Flyway uses to connect to the database.booleantrue to execute Flyway automatically when the application starts, false otherwise.booleanAllows migrations to be run "out of order".The password that Flyway uses to connect to the database.Prefix of every placeholder (default: ${ )Sets the placeholders to replace in SQL migration scripts.Suffix of every placeholder (default: } )booleantrue to execute a Flyway repair command when the application starts, false otherwise.The file name prefix for repeatable SQL migrations.Comma-separated case-sensitive list of schemas managed by Flyway.The file name prefix for versioned SQL migrations.The name of Flyway's schema history table.The username that Flyway uses to connect to the database.booleantrue to execute a Flyway validate command when the application starts, false otherwise.booleanWhether to validate migrations and callbacks whose scripts do not obey the correct naming convention.booleanWhether to automatically call validate when performing a migration. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
active
@ConfigItem(defaultValueDocumentation="\'true\' if the datasource is active; \'false\' otherwise") public Optional<Boolean> activeFlag to activate/deactivate Flyway for a specific datasource at runtime. -
connectRetries
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.
-
connectRetriesInterval
@ConfigItem(defaultValueDocumentation="120 seconds") public Optional<Duration> connectRetriesIntervalThe maximum time between retries when attempting to connect to the database.This will cap the interval between connect retries to the value provided.
-
defaultSchema
Sets the default schema managed by Flyway. This schema name is case-sensitive. If not specified, but schemas is, Flyway uses the first schema in that list. If that is also not specified, Flyway uses the default schema for the database connection.Consequences:
- This schema will be the one containing the schema history table.
- This schema will be the default for the database connection (provided the database supports this concept).
-
jdbcUrl
The JDBC URL that Flyway uses to connect to the database. Falls back to the datasource URL if not specified. -
username
The username that Flyway uses to connect to the database. If no specific JDBC URL is configured, falls back to the datasource username if not specified. -
password
The password that Flyway uses to connect to the database. If no specific JDBC URL is configured, falls back to the datasource password if not specified. -
schemas
Comma-separated case-sensitive list of schemas managed by Flyway. The first schema in the list will be automatically set as the default one during the migration. It will also be the one containing the schema history table. -
table
The name of Flyway's schema history table. By default (single-schema mode), the schema history table is placed in the default schema for the connection provided by the datasource. When the flyway.schemas property is set (multi-schema mode), the schema history table is placed in the first schema of the list. -
sqlMigrationPrefix
The file name prefix for versioned SQL migrations. Versioned SQL migrations have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix , which using the defaults translates to V1.1__My_description.sql -
repeatableSqlMigrationPrefix
The file name prefix for repeatable SQL migrations. Repeatable SQL migrations have the following file name structure: prefixSeparatorDESCRIPTIONsuffix , which using the defaults translates to R__My_description.sql -
cleanAtStart
true to execute Flyway clean command automatically when the application starts, false otherwise. -
cleanDisabled
true to prevent Flyway clean operations, false otherwise. -
cleanOnValidationError
true to automatically call clean when a validation error occurs, false otherwise. -
migrateAtStart
true to execute Flyway automatically when the application starts, false otherwise. -
repairAtStart
true to execute a Flyway repair command when the application starts, false otherwise. -
validateAtStart
true to execute a Flyway validate command when the application starts, false otherwise. -
baselineOnMigrate
true to execute Flyway baseline before migrations This flag is ignored if the flyway_schema_history table exists in the current schema or if the current schema is empty. Note that this will not automatically call migrate, you must either enable baselineAtStart or programmatically call flyway.migrate(). -
baselineAtStart
true to execute Flyway baseline automatically when the application starts. This flag is ignored if the flyway_schema_history table exists in the current schema. This will work even if the current schema is empty. -
baselineVersion
The initial baseline version. -
baselineDescription
The description to tag an existing schema with when executing baseline. -
validateOnMigrate
Whether to automatically call validate when performing a migration. -
outOfOrder
Allows migrations to be run "out of order". -
ignoreMissingMigrations
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. -
ignoreFutureMigrations
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. -
placeholders
Sets the placeholders to replace in SQL migration scripts. -
createSchemas
Whether Flyway should attempt to create the schemas specified in the schemas property -
placeholderPrefix
Prefix of every placeholder (default: ${ ) -
placeholderSuffix
Suffix of every placeholder (default: } ) -
initSql
The SQL statements to run to initialize a new database connection immediately after opening it. -
validateMigrationNaming
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. -
ignoreMigrationPatterns
Ignore migrations during validate and repair according to a given list of patterns (see https://flywaydb.org/documentation/configuration/parameters/ignoreMigrationPatterns for more information). When this configuration is set, the ignoreFutureMigrations and ignoreMissingMigrations settings are ignored. Patterns are comma separated.
-
-
Constructor Details
-
FlywayDataSourceRuntimeConfig
public FlywayDataSourceRuntimeConfig()
-
-
Method Details
-
defaultConfig
Creates aFlywayDataSourceRuntimeConfigwith default settings.- Returns:
FlywayDataSourceRuntimeConfig
-