# checking environment before executing the script

**URL:** <https://forum.liquibase.org/t/checking-environment-before-executing-the-script/2993>\
**Category:** General Discussion\
**Created:** [May 14, 2014, 10:07pm UTC](https://forum.liquibase.org/t/checking-environment-before-executing-the-script/2993 "2014-05-14T22:07:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![krishnajamindhar](https://avatars.discourse-cdn.com/v4/letter/k/a587f6/32.png) [@krishnajamindhar](https://forum.liquibase.org/u/krishnajamindhar)\
**Post date:** [May 14, 2014, 10:07pm UTC](https://forum.liquibase.org/t/checking-environment-before-executing-the-script/2993/1 "2014-05-14T22:07:00Z")

</div>

I am very new to liquibase. Currently we have the following requirement. Some of the scripts should be executed based on environment. For example&nbsp;

update application\_properties value=“123” where key=“abc” …this script should be executed in DEMO not in production. how do we solve this issue in Liquibase.

---

<div class="post-metadata">

**Author:** ![un1382561729492r88id](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@un1382561729492r88id](https://forum.liquibase.org/u/un1382561729492r88id)\
**Post date:** [May 14, 2014, 10:07pm UTC](https://forum.liquibase.org/t/checking-environment-before-executing-the-script/2993/2 "2014-05-14T22:07:00Z")

</div>

You would use contexts for this.&nbsp;

[http://www.liquibase.org/documentation/contexts.html](http://www.liquibase.org/documentation/contexts.html)

Note that the documentation for contexts is currently misleading - the section that described using things like ! (NOT), AND, and OR are only available on the 3.2-SNAPSHOT builds of Liquibase. Version 3.2 has not been released yet.  
  
Steve Donie  
Principal Software Engineer  
Datical, Inc. [http://www.datical.com/](http://www.datical.com/)
