Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.

spring.datasource.init-sql doesn't get executed because it isn't supported #1

Closed
jvmlet opened this issue Nov 16, 2016 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@jvmlet
Copy link

jvmlet commented Nov 16, 2016

According to readme in source.jdbc, there is spring.datasource.init-sql property that, as I understand, should be executed on startup, but it is not happening.
I also can't find the mapping for this property in DataSourceProperties

@jvmlet jvmlet changed the title spring.datasource.init-sql doesn't get executed jdbcSource: spring.datasource.init-sql doesn't get executed Nov 16, 2016
@artembilan artembilan added the bug label Nov 16, 2016
@artembilan
Copy link
Contributor

Yeah, confirmed.

I don't know how, but there is really no spring.datasource.init-sql property.
You should use spring.datasource.schema and spring.datasource.data properties for scripts.

They works by default though, if the first one is in the root of classpath with the schema.sql name and the second one with the data.sql name. The property spring.datasource.initialize is true by default.

The README will be fixed.

Thank you for catching that out!

@jvmlet
Copy link
Author

jvmlet commented Nov 16, 2016

BTW, sink suffers from the same issue.

@artembilan artembilan changed the title jdbcSource: spring.datasource.init-sql doesn't get executed spring.datasource.init-sql doesn't get executed because it isn't supported Nov 16, 2016
@sabbyanandan sabbyanandan added this to the 1.2.0.M1 milestone Feb 7, 2017
@trisberg trisberg removed the in pr label Feb 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

4 participants