Domanda

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!

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top