Running a Liquibase change log from within a change set?

public void execute(Database database) throws CustomChangeException { LOGGER.debug("Updating Schema " + originalSchema); confirmationMessage = “”; // if there’s an exception it’ll visible in the log. validateSettings(); JdbcConnection dbConn = (JdbcConnection) database.getConnection(); try { Database db = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(dbConn); String savedDefaultSchema = database.getDefaultSchemaName(); String savedLiquibaseSchema = database.getLiquibaseSchemaName(); database.setDefaultSchemaName(originalSchema); ChangeLogHistoryServiceFactory savedCLHSFactory = ChangeLogHistoryServiceFactory.getInstance(); ChangeLogHistoryServiceFactory.reset(); Liquibase liquibase = new Liquibase(changeLogPath, new ClassLoaderResourceAccessor(), database); liquibase.update(new Contexts(), new LabelExpression()); ChangeLogHistoryServiceFactory.setInstance(savedCLHSFactory); database.setDefaultSchemaName(savedDefaultSchema); confirmationMessage = String.format(“UpgradeSchema has successfully run on schema %s using change log %s.”, originalSchema, changeLogPath); } catch (DatabaseException de) { throw new CustomChangeException(de); } catch (LiquibaseException le) { throw new CustomChangeException(le); } }

Thanks for taking the time to read this.