flyway icon indicating copy to clipboard operation
flyway copied to clipboard

Support for non-JDBC drivers

Open jesmith17 opened this issue 3 years ago • 1 comments

Which version and edition of Flyway are you using?

All versions. Using flyway 9.5.1

Is there plans to provide support for Drivers that do not follow the JDBC specification? I understand that the JDBC spec gives a good reference point for the various operations that could be requested against the DB and that Flyway would need to support. However, it does limit the tool to only those DB's that can support the JDBC spec.

If there was an alternative pattern (for instance a custom interface that clients had to meet) it would create freedom for the community to contribute migration patterns for other DB engines (Dynamo, Mongo, etc..) that don't offer JDBC drivers.

You could extend the Database and Database Type classes to allow different ways for configuring the connection, and then create a separate interface file containing the various operations that the providers need to support. That would allow for those providers to NO-OP those functions that didn't apply to their platform, and still create a stable API for Flyway to work against.

I was trying to create a community plugin for MongoDB, but because it's supported Java driver isn't JDBC compliant, I get blocked. I know that this would be a potentially significant effort, but it would open up a entirely new set of DB's that you could support.

jesmith17 avatar Oct 22 '22 02:10 jesmith17

Is this being considered now that flyway-database-mongodb is being worked on?

https://documentation.red-gate.com/flyway/flyway-cli-and-api/supported-databases/mongodb

I'm trying to use that library in a Spring Boot app, and there are a lot of complications because of Flyway being so tightly coupled with JDBC. The biggest pain point is that you have to download a random open source Mongo JDBC driver jar and manually include it in your pom.xml. It would be nice if Flyway just used the regular MongoDB driver that Spring Data uses.

cfinlinson-incomm avatar Nov 12 '24 22:11 cfinlinson-incomm