From ebe074c7d3c1ec011d3e33512283bb73aa6e4562 Mon Sep 17 00:00:00 2001 From: Piotr Papaj <4591951+ppapaj@users.noreply.github.com> Date: Mon, 30 Mar 2026 13:53:37 +0200 Subject: [PATCH 1/2] Adapt documentation for Liquibase and Flyway to new modules See gh-49839 Signed-off-by: Piotr Papaj <4591951+ppapaj@users.noreply.github.com> --- .../antora/modules/how-to/pages/data-initialization.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc b/documentation/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc index 42050f05a7c7..73c99d3c4419 100644 --- a/documentation/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc +++ b/documentation/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc @@ -98,8 +98,8 @@ 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 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. +In-memory and file-based databases are supported by `spring-boot-starter-flyway`. +Otherwise, a database-specific module is also required. For example, use `org.flywaydb:flyway-database-postgresql` with PostgreSQL and `org.flywaydb:flyway-mysql` with MySQL. See https://documentation.red-gate.com/fd/supported-databases-and-versions-143754067.html[the Flyway Documentation] for further details. @@ -169,11 +169,11 @@ With that setup, migrations in `dev/db/migration` run only when the `dev` profil [[howto.data-initialization.migration-tool.liquibase]] === Execute Liquibase Database Migrations on Startup -To automatically run Liquibase database migrations on startup, add the `org.liquibase:liquibase-core` to your classpath. +To automatically run Liquibase database migrations on startup, add the `spring-boot-starter-liquibase` to your classpath. [NOTE] ==== -When you add the `org.liquibase:liquibase-core` to your classpath, database migrations run by default for both during application startup and before your tests run. +When you add the `spring-boot-starter-liquibase` to your classpath, database migrations run by default for both during application startup and before your tests run. This behavior can be customized by using the configprop:spring.liquibase.enabled[] property, setting different values in the `main` and `test` configurations. It is not possible to use two different ways to initialize the database (for example Liquibase for application startup, JPA for test runs). ==== From c9cb517debc858166580c083501741f03b6e7292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Fri, 3 Apr 2026 09:10:53 +0200 Subject: [PATCH 2/2] Polish "Adapt documentation for Liquibase and Flyway to new modules" See gh-49839 --- .../antora/modules/how-to/pages/data-initialization.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc b/documentation/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc index 73c99d3c4419..c1d3117a7acd 100644 --- a/documentation/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc +++ b/documentation/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc @@ -98,8 +98,8 @@ 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 appropriate Flyway module to your classpath. -In-memory and file-based databases are supported by `spring-boot-starter-flyway`. -Otherwise, a database-specific module is also required. +In-memory and file-based databases are supported by the `spring-boot-starter-flyway` starter. +Other cases require also a database-specific module. For example, use `org.flywaydb:flyway-database-postgresql` with PostgreSQL and `org.flywaydb:flyway-mysql` with MySQL. See https://documentation.red-gate.com/fd/supported-databases-and-versions-143754067.html[the Flyway Documentation] for further details. @@ -169,11 +169,11 @@ With that setup, migrations in `dev/db/migration` run only when the `dev` profil [[howto.data-initialization.migration-tool.liquibase]] === Execute Liquibase Database Migrations on Startup -To automatically run Liquibase database migrations on startup, add the `spring-boot-starter-liquibase` to your classpath. +To automatically run Liquibase database migrations on startup, add the `spring-boot-starter-liquibase` starter to your classpath. [NOTE] ==== -When you add the `spring-boot-starter-liquibase` to your classpath, database migrations run by default for both during application startup and before your tests run. +When you add `spring-boot-starter-liquibase` to your classpath, database migrations run by default for both during application startup and before your tests run. This behavior can be customized by using the configprop:spring.liquibase.enabled[] property, setting different values in the `main` and `test` configurations. It is not possible to use two different ways to initialize the database (for example Liquibase for application startup, JPA for test runs). ====