Register YugabyteDB extension.

This commit is contained in:
Kavin 2023-08-14 10:03:05 +01:00
parent 66abab9389
commit 28a1a481c7
No known key found for this signature in database
GPG Key ID: 6E4598CA5C92C41F

View File

@ -26,6 +26,9 @@ public class LiquibaseHelper {
// ensure postgres driver is loaded
DriverManager.registerDriver(new org.postgresql.Driver());
// register YugabyteDB database
DatabaseFactory.getInstance().register(new liquibase.ext.yugabytedb.database.YugabyteDBDatabase());
Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(new JdbcConnection(DriverManager.getConnection(url, username, password)));
try (Liquibase liquibase = new Liquibase("changelog/db.changelog-master.xml", new ClassLoaderResourceAccessor(), database)) {