Polish "Add hint for new dependencies required for Flyway"

See gh-41574
This commit is contained in:
Andy Wilkinson 2024-07-23 16:21:06 +01:00
parent 0fa9467ef3
commit 8de72c80c6
1 changed files with 5 additions and 2 deletions

View File

@ -97,8 +97,11 @@ Spring Boot supports two higher-level migration tools: https://flywaydb.org/[Fly
[[howto.data-initialization.migration-tool.flyway]]
=== Execute Flyway Database Migrations on Startup
To automatically run Flyway database migrations on startup, add the `org.flywaydb:flyway-core` to your classpath.
All databases that are not in-memory or file based need an additional dependency, e.g. `org.flywaydb:flyway-database-postgresql` is required for PostgreSQL and `org.flywaydb:flyway-mysql` is required for MySQL (see https://documentation.red-gate.com/flyway/flyway-cli-and-api/supported-databases[Supported Databases in the Flyway Documentation] for details).
To automatically run Flyway database migrations on startup, add the appropriate Flyway module to your classpath.
In-memory and file-based databases are supported by `org.flywaydb:flyway-core`.
Otherwise, a database-specific module is required.
For example, use `org.flywaydb:flyway-database-postgresql` with PostgreSQL and `org.flywaydb:flyway-mysql` with MySQL.
See https://documentation.red-gate.com/flyway/flyway-cli-and-api/supported-databases[the Flyway Documentation] for further details.
Typically, migrations are scripts in the form `V<VERSION>__<NAME>.sql` (with `<VERSION>` an underscore-separated version, such as '`1`' or '`2_1`').
By default, they are in a directory called `classpath:db/migration`, but you can modify that location by setting `spring.flyway.locations`.