Use FluentConfiguration to configure Flyway
This commit stops binding the Flyway object directly to the environment as mutating it will no longer be supported in Flyway 6. This commit mirrors Flyway's configuration in FlywayProperties for the most part. Closes gh-14776
This commit is contained in:
@@ -552,47 +552,42 @@ content into your application. Rather, pick only the properties that you need.
|
||||
# ----------------------------------------
|
||||
|
||||
# FLYWAY ({sc-spring-boot-autoconfigure}/flyway/FlywayProperties.{sc-ext}[FlywayProperties])
|
||||
spring.flyway.baseline-description= #
|
||||
spring.flyway.baseline-on-migrate= #
|
||||
spring.flyway.baseline-version=1 # Version to start migration
|
||||
spring.flyway.batch= #
|
||||
spring.flyway.baseline-description=<< Flyway Baseline >> # Description to tag an existing schema with when applying a baseline.
|
||||
spring.flyway.baseline-on-migrate=false # Whether to automatically call baseline when migrating a non-empty schema.
|
||||
spring.flyway.baseline-version=1 # Version to tag an existing schema with when executing baseline.
|
||||
spring.flyway.check-location=true # Whether to check that migration scripts location exists.
|
||||
spring.flyway.clean-disabled= #
|
||||
spring.flyway.clean-on-validation-error= #
|
||||
spring.flyway.dry-run-output= #
|
||||
spring.flyway.clean-disabled=false # Whether to disable cleaning of the database.
|
||||
spring.flyway.clean-on-validation-error=false # Whether to automatically call clean when a validation error occurs.
|
||||
spring.flyway.connect-retries=0 # Maximum number of retries when attempting to connect to the database.
|
||||
spring.flyway.enabled=true # Whether to enable flyway.
|
||||
spring.flyway.error-handlers= #
|
||||
spring.flyway.error-overrides= #
|
||||
spring.flyway.group= #
|
||||
spring.flyway.ignore-ignored-migrations= #
|
||||
spring.flyway.ignore-future-migrations= #
|
||||
spring.flyway.ignore-missing-migrations= #
|
||||
spring.flyway.encoding=UTF-8 # Encoding of SQL migrations.
|
||||
spring.flyway.group=false # Whether to group all pending migrations together in the same transaction when applying them.
|
||||
spring.flyway.ignore-future-migrations=true # Whether to ignore future migrations when reading the schema history table.
|
||||
spring.flyway.ignore-ignored-migrations=false # Whether to ignore ignored migrations when reading the schema history table.
|
||||
spring.flyway.ignore-missing-migrations=false # Whether to ignore missing migrations when reading the schema history table.
|
||||
spring.flyway.ignore-pending-migrations=false # Whether to ignore pending migrations when reading the schema history table.
|
||||
spring.flyway.init-sqls= # SQL statements to execute to initialize a connection immediately after obtaining it.
|
||||
spring.flyway.installed-by= #
|
||||
spring.flyway.locations=classpath:db/migration # The locations of migrations scripts.
|
||||
spring.flyway.mixed= #
|
||||
spring.flyway.oracle-sqlplus= #
|
||||
spring.flyway.out-of-order= #
|
||||
spring.flyway.password= # JDBC password to use if you want Flyway to create its own DataSource.
|
||||
spring.flyway.placeholder-prefix= #
|
||||
spring.flyway.placeholder-replacement= #
|
||||
spring.flyway.placeholder-suffix= #
|
||||
spring.flyway.placeholders.*= #
|
||||
spring.flyway.repeatable-sql-migration-prefix= #
|
||||
spring.flyway.schemas= # Schemas to update.
|
||||
spring.flyway.skip-default-callbacks= #
|
||||
spring.flyway.skip-default-resolvers= #
|
||||
spring.flyway.sql-migration-prefix=V #
|
||||
spring.flyway.sql-migration-separator= #
|
||||
spring.flyway.sql-migration-suffix=.sql #
|
||||
spring.flyway.sql-migration-suffixes= #
|
||||
spring.flyway.stream= #
|
||||
spring.flyway.table= #
|
||||
spring.flyway.target= #
|
||||
spring.flyway.undo-sql-migration-prefix= #
|
||||
spring.flyway.installed-by= # Username recorded in the schema history table as having applied the migration.
|
||||
spring.flyway.locations=classpath:db/migration # Locations of migrations scripts. Can contain the special "{vendor}" placeholder to use vendor-specific locations.
|
||||
spring.flyway.mixed=false # Whether to allow mixing transactional and non-transactional statements within the same migration.
|
||||
spring.flyway.out-of-order=false # Whether to allow migrations to be run out of order.
|
||||
spring.flyway.password= # Login password of the database to migrate.
|
||||
spring.flyway.placeholder-prefix=${ # Prefix of placeholders in migration scripts.
|
||||
spring.flyway.placeholder-replacement=true # Perform placeholder replacement in migration scripts.
|
||||
spring.flyway.placeholder-suffix=} # Suffix of placeholders in migration scripts.
|
||||
spring.flyway.placeholders= # Placeholders and their replacements to apply to sql migration scripts.
|
||||
spring.flyway.repeatable-sql-migration-prefix=R # File name prefix for repeatable SQL migrations.
|
||||
spring.flyway.schemas= # Scheme names managed by Flyway (case-sensitive).
|
||||
spring.flyway.skip-default-callbacks=false # Whether to skip default callbacks. If true, only custom callbacks are used.
|
||||
spring.flyway.skip-default-resolvers=false # Whether to skip default resolvers. If true, only custom resolvers are used.
|
||||
spring.flyway.sql-migration-prefix=V # File name prefix for SQL migrations.
|
||||
spring.flyway.sql-migration-separator=__ # File name separator for SQL migrations.
|
||||
spring.flyway.sql-migration-suffixes=.sql # File name suffix for SQL migrations.
|
||||
spring.flyway.table=flyway_schema_history # Name of the schema schema history table that will be used by Flyway.
|
||||
spring.flyway.target= # Target version up to which migrations should be considered.
|
||||
spring.flyway.url= # JDBC url of the database to migrate. If not set, the primary configured data source is used.
|
||||
spring.flyway.user= # Login user of the database to migrate.
|
||||
spring.flyway.validate-on-migrate= #
|
||||
spring.flyway.validate-on-migrate=true # Whether to automatically call validate when performing a migration.
|
||||
|
||||
# LIQUIBASE ({sc-spring-boot-autoconfigure}/liquibase/LiquibaseProperties.{sc-ext}[LiquibaseProperties])
|
||||
spring.liquibase.change-log=classpath:/db/changelog/db.changelog-master.yaml # Change log configuration path.
|
||||
|
||||
@@ -2327,11 +2327,11 @@ according to the type of the database (such as `db/migration/mysql` for MySQL).
|
||||
of supported databases is available in
|
||||
{sc-spring-boot}/jdbc/DatabaseDriver.{sc-ext}[`DatabaseDriver`].
|
||||
|
||||
See the Flyway class from flyway-core for details of available settings such as schemas
|
||||
and others. In addition, Spring Boot provides a small set of properties (in
|
||||
{sc-spring-boot-autoconfigure}/flyway/FlywayProperties.{sc-ext}[`FlywayProperties`])
|
||||
that can be used to disable the migrations or switch off the location checking. Spring
|
||||
Boot calls `Flyway.migrate()` to perform the database migration. If you would like
|
||||
{sc-spring-boot-autoconfigure}/flyway/FlywayProperties.{sc-ext}[`FlywayProperties`]
|
||||
provides most of Flyway's settings and a small set of additional properties that can be
|
||||
used to disable the migrations or switch off the location checking.
|
||||
|
||||
Spring Boot calls `Flyway.migrate()` to perform the database migration. If you would like
|
||||
more control, provide a `@Bean` that implements
|
||||
{sc-spring-boot-autoconfigure}/flyway/FlywayMigrationStrategy.{sc-ext}[`FlywayMigrationStrategy`].
|
||||
|
||||
|
||||
Reference in New Issue
Block a user