Skip to content

Add info about new Data Initialization modules#49839

Open
ppapaj wants to merge 3 commits intospring-projects:mainfrom
ppapaj:add-new-module-info-to-docs
Open

Add info about new Data Initialization modules#49839
ppapaj wants to merge 3 commits intospring-projects:mainfrom
ppapaj:add-new-module-info-to-docs

Conversation

@ppapaj
Copy link
Copy Markdown

@ppapaj ppapaj commented Mar 30, 2026

This change is a minor fix in the documentation.

I found the current phrasing a bit misleading as of Spring Boot 4.0 there's a new dependency required for automated Flyway and Liquibase migrations. If you have any suggestions about the phrasing - I'll be more than happy to adjust.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 30, 2026
Signed-off-by: Piotr Papaj <4591951+ppapaj@users.noreply.github.com>
@ppapaj ppapaj force-pushed the add-new-module-info-to-docs branch from 4c75bef to a8b2c8f Compare March 30, 2026 12:04
@wilkinsona
Copy link
Copy Markdown
Member

Thanks for the proposal. Rather than adding a note, I think it would be better to update the documentation that talks about the Flyway and Liquibase dependencies:

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`.

To automatically run Liquibase database migrations on startup, add the `org.liquibase:liquibase-core` 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.
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).
====

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Mar 30, 2026
Signed-off-by: Piotr Papaj <4591951+ppapaj@users.noreply.github.com>
@ppapaj
Copy link
Copy Markdown
Author

ppapaj commented Mar 30, 2026

I updated the docs accordingly, you can take a look

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Mar 30, 2026
Copy link
Copy Markdown
Member

@wilkinsona wilkinsona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates. I've left a couple of further comments for your consideration.

=== 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 `org.liquibase:liquibase-core` and `spring-boot-starter-liquibase` to your classpath.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need for both dependencies as liquibase-core is a dependency of spring-boot-starter-liquibase.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're absolutely right. Fixed along with the reference to the library in the note below.

Comment on lines 100 to 103
To automatically run Flyway database migrations on startup, add the appropriate Flyway module to your classpath along with `spring-boot-starter-flyway` module.
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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite right. We should instruct users to add spring-boot-starter-flyway. That's all they need for in-memory and file-based DBs.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, fixed

Copy link
Copy Markdown
Member

@wilkinsona wilkinsona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left a couple of comments for your consideration, @ppapaj.

@wilkinsona wilkinsona added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Mar 31, 2026
Signed-off-by: Piotr Papaj <4591951+ppapaj@users.noreply.github.com>
@ppapaj ppapaj requested a review from wilkinsona April 1, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants