PreConditions work as a separated transaction whose decide if ChangeSet will run. But when I am only using Liquibase.update(context, writer) to generate output scripts, preConditions tag is not being rendered as "if (mycondition) then *my change*. How can I do it by using main liquibase call?
NOTE: I am already writing an extension class for custom template generation (using SqlGeneratorFactory.generateSql), so I could create another method that receives a changeSet and a database, surround changes with preCondition (according to parameterized database) and output sql. Should be this a good approach?