Dear developers of liquibase
I am tring to use liquibase on a HSQLDB.
After many trials (on 2.0.4 and 2.0.5) I noticed that:
1- Tables DATABASECHANGELOG and PUBLIC.DATABASECHANGELOGLOCK are only created if method liquibase.checkDatabaseChangeLogTable(false, null, null) is called.
2- Method liquibase.update(…) is not giving any exception, is outputting the expected SQL statements.
In my case, there is a statement for creating a new table and a statement for inserting a record in the DATABASECHANGELOG table.
After using the liquibase sources and debugging the liquibase.update method I changes the method as follows (commented two lines):
public void update(String contexts, Writer output) throws LiquibaseException {
contexts = StringUtils.trimToNull(contexts);
changeLogParameters.setContexts(StringUtils.splitAndTrim(contexts, “,”));
Executor oldTemplate = ExecutorService.getInstance().getExecutor(database);
//LoggingExecutor loggingExecutor = new LoggingExecutor(ExecutorService.getInstance().getExecutor(database), output, database);
//ExecutorService.getInstance().setExecutor(database, loggingExecutor);
outputHeader(“Update Database Script”);
…
Using this code, liquibase.update() does make the appropriate changes in the database as it uses the JdbcExecutor and not the LoggingExecutor.
Is this a failure in the code? Am I doing something wrong?
Regards
César