Rollback with Liquibase

Hi,


I am currently trying to understand the rollback feature of liquibase. I am unable to understand the execution of the rollback.

Here is my scenario.


I have an application A with the following DB schema


Id----firstname-----lastname------phonenumber


I update the application with email address so now my table looks like this 


Id----firstname-----lastname------phonenumber------emailAddress



If the application is not successfully started then I wish to execute the rollback so that I remove the emailAddress.


How can I do it ? I fail to find any examples on the liquibase website so an example will be helpful



Regards




In liquibase the command to rollback database changes is “rollback.”  The documentation for that command is http://www.liquibase.org/documentation/rollback.html.

 

I think the essense of your question is how to trigger rollback.  The answer is that you can either trigger it manually or through the api.  If you include the liquibase jars in your application you could have your exception handler invoke the liqubase rollback.  The simpler way is to do it manually when your test process realizes that the application is not working with that change.