Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Write preConditions in output file

$
0
0
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?


Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>