liquibase/liquibase — pull request #70 by barneyb (2012-10-01 18:40:19+00:00)
Title: created framework for specifying preconditions in formatted SQL changelo...

...gs (currently only SqlCheck preconditions are supported)

* added support for a "--preconditions" magic comment with support for 'onFail', 'onError', and 'onUpdateSql' attributes
* added support for a "--precondition-sql-check" magic comment with support for an 'expectedResult' attribute and the rest of the body being the SQL statement to execute
* a PreconditionsContainer is implicitly created (using defaults) if a --precondition-xxx is found before a --preconditions
* multiple --preconditions will be handled in a last-one-wins fashion (including an implicitly created one, if exists)
* the 'expectedResult' attribute may be unnamed - the first post-comment word will be assumed to be the expected value
* the 'expectedResult' attribute's value may be quoted with single- or double-quotes (or unquoted)