flyway / flyway-community-db-support

Offical Flyway Community Supported Database Plugins
https://flywaydb.org/
Apache License 2.0
5 stars 30 forks source link

[ClickHouse] Add support for schema switching with older JDBC drivers #18

Closed sazonov closed 8 months ago

sazonov commented 8 months ago

Since JDBC driver 0.5.0 we need to check "connection.getJdbcConfig().useCatalog()" property to find out what method to call to set the current schema: jdbcConnection.setCatalog() or jdbcConnection.setSchema(). The same thing is for obtaining the current schema from JDBC connection.

sazonov commented 8 months ago

@Chris3LC could you please review this PR. The schema switching was not working on drivers lower than 0.5.0 after last fixes for cluster env.

Chris3LC commented 8 months ago

@Chris3LC could you please review this PR. The schema switching was not working on drivers lower than 0.5.0 after last fixes for cluster env.

It's looking good to me. Thank you.

sazonov commented 8 months ago

@Barry-RG could you please check this PR.