use of liquibase.database.jvm.JdbcConnection in project libresonic by Libresonic.
the class SpringLiquibase method createDatabase.
@Override
protected Database createDatabase(Connection c, ResourceAccessor resourceAccessor) throws DatabaseException {
DatabaseConnection liquibaseConnection;
if (c == null) {
log.warning("Null connection returned by liquibase datasource. Using offline unknown database");
liquibaseConnection = new OfflineConnection("offline:unknown", resourceAccessor);
} else {
liquibaseConnection = new JdbcConnection(c);
}
DatabaseFactory factory = DatabaseFactory.getInstance();
overrideHsqlDbImplementation(factory);
Database database = factory.findCorrectDatabaseImplementation(liquibaseConnection);
if (StringUtils.trimToNull(this.defaultSchema) != null) {
database.setDefaultSchemaName(this.defaultSchema);
}
return database;
}
Aggregations