-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Non-embedded databases have schema/data.sql scripts applied by default #26682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the feedback. This is an unfortunate use-case that we didn't completely consider when we redesigned the code. I've update our release notes to add a warning. Please let me know you think that doesn't cover it. I'll flag this issue for team attention to see if there's anything else that we can do to try an improve the situation. |
I think the main issue is moving from a ternary value to a binary one (https://twitter.com/nicolas_frankel/status/1397182454029602822). You can do less damage by having the default set to |
We're going to try to restore the enum support, although we might not be able to support that with R2DBC |
Thanks a lot for taking care and discussing the issue. Will the detection of embedded or non-embedded database be available again and data/schema.sql only be running with embedded by default? |
@everflux That's our current plan, but we've not dug into the details yet. |
In my project I have mariadb and h2 dependencies and
data.sql
/schema.sql
.For development h2 is used, a 'dev' profile is used without
spring.datasource.*
properties and a 'prod' profile sets the properties for mariadb.Before Spring Boot 2.5.0 the behaviour was to use
schema.sql
anddata.sql
for h2, but not for mariadb.In Spring Boot 2.5.0 the
schema.sql
anddata.sql
are executed on each application start/reload.While this change is surprising there may be good reasons for it, but it should be documented in a prominent manner, as it could lead to problems with production data.
The text was updated successfully, but these errors were encountered: