forked from spring-projects/spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure Flyway with initSqls for any DataSource configuration
Previously, spring.flyway.init-sqls was only applied to Flyway's configuration if Flyway was being configured to create the DataSource. If Flyway was being configured to use an existing DataSource, init-sqls was not applied. This is a hangover from when the init SQLs support was introduced. At that time, Flyway only supported SQL to initialize the connection when it was creating the DataSource. Flyway 5.2 added init SQL support no matter how Flyway's DataSource was configured. This commit updates FlywayAutoConfiguration to always apply the init-sqls property to Flyway's configuration. The property's documentation does not describe the current limitation so this change should align the behaviour with what the documentation leads people to expect. Fixes spring-projectsgh-23392
- Loading branch information
1 parent
5ec673f
commit 95f26c6
Showing
2 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters