From 0fa9467ef322995475daaee75f53f7388843d83b Mon Sep 17 00:00:00 2001 From: Jan Mewes Date: Mon, 22 Jul 2024 12:35:01 +0200 Subject: [PATCH 1/2] Add hint for new dependencies required for Flyway See gh-41574 --- .../docs/antora/modules/how-to/pages/data-initialization.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc index f86c439611d..8ce78d7b471 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc @@ -98,6 +98,7 @@ Spring Boot supports two higher-level migration tools: https://flywaydb.org/[Fly === 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). Typically, migrations are scripts in the form `V__.sql` (with `` 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`. From 8de72c80c663add7680d680f585b808a96942ee9 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 23 Jul 2024 16:21:06 +0100 Subject: [PATCH 2/2] Polish "Add hint for new dependencies required for Flyway" See gh-41574 --- .../antora/modules/how-to/pages/data-initialization.adoc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc index 8ce78d7b471..d48c200c881 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc @@ -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__.sql` (with `` 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`.