# Is it possible to pass changelog parameter values via --defaultsFile?

**URL:** <https://forum.liquibase.org/t/is-it-possible-to-pass-changelog-parameter-values-via-defaultsfile/1805>\
**Category:** General Discussion\
**Created:** [January 25, 2012, 2:43am UTC](https://forum.liquibase.org/t/is-it-possible-to-pass-changelog-parameter-values-via-defaultsfile/1805 "2012-01-25T02:43:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [January 25, 2012, 2:43am UTC](https://forum.liquibase.org/t/is-it-possible-to-pass-changelog-parameter-values-via-defaultsfile/1805/1 "2012-01-25T02:43:00Z")

</div>

Nope, not that. The statements I’m parameterizing are UPDATEs that use the current database to read data and a different database to write data:

&nbsp; &nbsp; &nbsp; UPDATE ${target}.foo (x, y, z)

&nbsp; &nbsp; &nbsp; SELECT x, y, z FROM bar

It’s a good thought, but I think --defaultSchema just moves the problem around.

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [January 25, 2012, 2:43am UTC](https://forum.liquibase.org/t/is-it-possible-to-pass-changelog-parameter-values-via-defaultsfile/1805/2 "2012-01-25T02:43:00Z")

</div>

Mornin’.

We’re in a situation where we’d like to use changelog parameters to identify the target schema for some changes (we’re on MySQL, and the “schema” - database - names vary from environment to environment). Ideally, I’d tell folks to stuff the appropriate values in their liquibase.properties file, put some sensible defaults in the migration files, and move on, but this doesn’t appear to work:

Unexpected error running Liquibase: Unknown parameter: ‘schema’

Unexpected error running Liquibase: Unknown parameter: ‘Dschema’

Is this possible? Or is there another good way to handle this that doesn’t lead to having a different command line for each environment?

---

<div class="post-metadata">

**Author:** ![ljnelson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/ljnelson/32/120_2.png) [@ljnelson](https://forum.liquibase.org/u/ljnelson)\
**Post date:** [January 25, 2012, 2:43am UTC](https://forum.liquibase.org/t/is-it-possible-to-pass-changelog-parameter-values-via-defaultsfile/1805/3 "2012-01-25T02:43:00Z")

</div>

I think you want the http://about.me/lairdnelson

---

<div class="post-metadata">

**Author:** ![ljnelson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/ljnelson/32/120_2.png) [@ljnelson](https://forum.liquibase.org/u/ljnelson)\
**Post date:** [January 25, 2012, 2:43am UTC](https://forum.liquibase.org/t/is-it-possible-to-pass-changelog-parameter-values-via-defaultsfile/1805/4 "2012-01-25T02:43:00Z")

</div>

Oh, I see.&nbsp; I think you’re out of luck with respect to the properties file.  
  
You could always try the nuclear option ([-DyourPropertyHere=foobar).&nbsp; Ick, but it’s crazy enough it might just work!  
  
Best,  
Laird  
  
–  
](http://mindprod.com/jgloss/javaexe.html#JAVAOPTIONS)[http://about.me/lairdnelson](http://about.me/lairdnelson)

---

<div class="post-metadata">

**Author:** ![un1383690072550r50id](https://avatars.discourse-cdn.com/v4/letter/u/6a8cbe/32.png) [@un1383690072550r50id](https://forum.liquibase.org/u/un1383690072550r50id)\
**Post date:** [January 25, 2012, 2:43am UTC](https://forum.liquibase.org/t/is-it-possible-to-pass-changelog-parameter-values-via-defaultsfile/1805/5 "2012-01-25T02:43:00Z")

</div>

I have a very similar use case for this. Did anyone find a good solution? My ideal would be to be able to set a value in a liquibase.properties file and have that property substituted inside a change.

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [January 25, 2012, 2:43am UTC](https://forum.liquibase.org/t/is-it-possible-to-pass-changelog-parameter-values-via-defaultsfile/1805/6 "2012-01-25T02:43:00Z")

</div>

Nathan
