Skip to content
Svein Rune Engebakken edited this page Sep 20, 2021 · 9 revisions

Token Replacement

Any value that is in the configuration can be tokenized in the scripts.

ALTER DATABASE {{DatabaseName}} will be replaced as ALTER DATABASE Bob when the database name is Bob.

This is not case sensitive.

Notes

Using token replacement in your scripts locks those scripts into RoundhousE. I would use something like this VERY sparingly.

Supported Tokens

The supported tokens are defined by the public properties of roundhouse.infrastructure.app.ConfigurationPropertyHolder

https://github.com/chucknorris/roundhouse/blob/master/product/roundhouse.core/infrastructure.app/ConfigurationPropertyHolder.cs

User defined tokens

User defined tokens are supported for token replacement. You can add user defined tokens using the --ut or --usertokens switch. The user defined token is defined in key=value pairs. You can define multiple user defined tokens separated with semicolon.

Example: --ut=MyTablePrefix=local;MyOtherToken=OtherValue

The tokens can then be used for token replacement in scripts: ALTER TABLE {{MyTablePrefix}}_TableName will become ALTER TABLE local_TableName

Clone this wiki locally