Is there a way to set flyway to use an existing java.sql.Connection as DataSource, resp. is there a way to generate a DataSource from an existing java.sql.Connection?
I did not find a simple way to do so!
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Flyway is currently designed to use at least two connections, one for the metadata table and one for the migrations. This has been done so to allow parallel transactions and synchronizing between nodes using locking. This way the migration can be rolled back in the case of failure while still marking it as failed in the metadata table. That’s the reason why a datasource is required and not just a connection.
If this is a big thing for you, please file an issue in the Issue Tracker.