Skip to content

ConfigurationOptions

ferventcoder edited this page Jun 17, 2011 · 38 revisions

RoundhousE Configuration Options

Barebone

At a minimum you just need to tell RoundhousE your database name. It will deploy to the local sql database server ("(local)") looking for sql script folders in the current directory (".").

rh /d bob

The command above would create a database named bob on the local sql server (default instance) using a trusted connection. You can also pass a connection string.

Full Configuration

This is based wholly on the output that you can get if you type rh /?.

This shows how to specify the command followed by a pipe (“|”), the option name and usage. Also notes the default setting. The configuration uses NDesk.Options so you can pass things in with -t --t or /t.

  • -?, --help, -h | Prints out the options.

Main Stuff

  • -d, --db, --database, --databasename=VALUE | REQUIRED: DatabaseName - The database you want to create/migrate.
  • -c, --cs, --connstring, --connectionstring=VALUE | REQUIRED: ConnectionString - As an alternative to ServerName and Database - You can provide an entire connection string instead.
  • -f, --files, --sqlfilesdirectory=VALUE | SqlFilesDirectory - The directory where your SQL scripts are. Defaults to .\.
  • -s, --server, --servername, --instance, --instancename=VALUE | ServerName - The server and instance you would like to run on. (local) and (local)\SQL2008 are both valid values. Defaults to (local).
  • --csa, --connstringadmin, --connectionstringadministration=VALUE | ConnectionStringAdministration - This is used for connecting to master when you may have a different uid and password than normal.
  • --dt, --dbt, --databasetype=VALUE | DatabaseType - Tells RH what type of database it is running on. This is a plugin model. This is the fully qualified name of a class that implements the interface roundhouse.sql.Database, roundhouse. If you have your own assembly, just set it next to rh.exe and set this value appropriately. Defaults to sqlserver which is a synonym for roundhouse.databases.sqlserver.SqlServerDatabase, roundhouse.databases.sqlserver.
  • --env, --environment, --environmentname=VALUE | EnvironmentName - This allows RH to be environment aware and only run scripts that are in a particular environment based on the namingof the script. LOCAL.something.ENV.sql would only be run in the LOCAL environment. Defaults to LOCAL.
  • -o, --output, --outputpath=VALUE | OutputPath - This is where everything related to the migration is stored. This includes any backups, all items that ran, permission dumps, logs, etc. Defaults to a special folder, common application data with roundhouse as subdirectory, i.e. C:\ProgramData\RoundhousE.

Versioning

  • -r, --repo, --repositorypath=VALUE | RepositoryPath - The repository. A string that can be anything. Used to track versioning along with the version. Defaults to null.
  • --vf, --versionfile=VALUE | VersionFile - Either an XML file or a DLL that a version can be resolved from. Defaults to _BuildInfo.xml.
  • --vx, --versionxpath=VALUE | VersionXPath - Works in conjunction with an XML version file. Defaults to //buildInfo/version.

Folder locations

  • -u, --up, --upfolder, --upfoldername=VALUE | UpFolderName - The name of the folder where you keep your update scripts. Will recurse through subfolders. Defaults to up.
  • --rf, --runfirst, --runfirstfolder, --runfirstafterupdatefolder, --runfirstafterupdatefoldername=VALUE | RunFirstAfterUpdateFolderName - The name of the folder where you keep any functions, views, or sprocs that are order dependent. If you have a function that depends on a view, you definitely need the view in this folder. Will recurse through subfolders. Defaults to runFirstAfterUp.
  • --fu, --functions, --functionsfolder, --functionsfoldername=VALUE | FunctionsFolderName - The name of the folder where you keep your functions. Will recurse through subfolders. Defaults to functions.
  • --vw, --views, --viewsfolder, --viewsfoldername=VALUE | ViewsFolderName - The name of the folder where you keep your views. Will recurse through subfolders. Defaults to views.
  • --sp, --sprocs, --sprocsfolder, --sprocsfoldername=VALUE | SprocsFolderName - The name of the folder where you keep your stored procedures. Will recurse through subfolders. Defaults to sprocs.
  • --ra, --runAfterOtherAnyTimeScripts, --runAfterOtherAnyTimeScriptsfolder, --runAfterOtherAnyTimeScriptsfoldername=VALUE | RunAfterOtherAnyTimeScriptsFolderName - The name of the folder where you keep scripts that will be run after all of the other any time scripts complete. Will recurse through subfolders. Defaults to runAfterOtherAnyTimeScripts.
  • -p, --permissions, --permissionsfolder, --permissionsfoldername=VALUE | PermissionsFolderName - The name of the folder where you keep your permissions scripts. Will recurse through subfolders. Defaults to permissions.

RoundhousE Schema/Tables

  • --sc, --schema, --schemaname=VALUE | SchemaName - This is the schema where RH stores it's tables. Once you set this a certain way, do not change this. This is definitely running with scissors and very sharp. I am allowing you to have flexibility, but because this is a knife you can still get cut if you use it wrong. I'm just saying. You've been warned. Defaults to RoundhousE.
  • --vt, --versiontable, --versiontablename=VALUE | VersionTableName - This is the table where RH stores versioning information. Once you set this, do not change this. This is definitely running with scissors and very sharp. Defaults to Version.
  • --srt, --scriptsruntable, --scriptsruntablename=VALUE | ScriptsRunTableName - This is the table where RH stores information about scripts that have been run. Once you set this a certain way, do not change this. This is definitely running with scissors and very sharp. Defaults to ScriptsRun.
  • --sret, --scriptsrunerrorstable, --scriptsrunerrorstablename=VALUE | ScriptsRunErrorsTableName - This is the table where RH stores information about scripts that have been run with errors. Once you set this a certain way, do not change this. This is definitelly running with scissors and very sharp. Defaults to ScriptsRunErrors.

Restore Options

  • --restore | Restore - This instructs RH to do a restore (with the restorefrompath parameter) of a database before running migration scripts. Defaults to false.

  • --rfp, --restorefrom, --restorefrompath=VALUE | RestoreFromPath - This tells the restore where to get to the backed up database. Defaults to null. Required if /restore has been set. NOTE: will try to use Litespeed for the restore if the last two characters of the name are LS (as in DudeLS.bak).

  • --rco, --restoreoptions, --restorecustomoptions=VALUE | RestoreCustomOptions - This provides the restoreany custom options as in MOVE='Somewhere or another'.

  • --rt, --restoretimeout=VALUE | RestoreTimeout - Allows you to specify a restore timeout in seconds. The default is 900 seconds.

  • --cds, --createdatabasescript, --createdatabasecustomscript=VALUE | CreateDatabaseCustomScript - This instructs RH to use this script for creating a database instead of the default based on the SQLType.

Switches

  • --drop | Drop - This instructs RH to remove a database and not run migration scripts. Defaults to false.
  • --dc, --dnc, --donotcreatedatabase | DoNotCreateDatabase - This instructs RH to not create a database if it does not exists. Defaults to false.
  • -w, --warnononetimescriptchanges | WarnOnOneTimeScriptChanges - If you do not want RH to error when you change scripts that should not change, you must set this flag. One time scripts are DDL/DML (anything in the upFolder). Defaults to false.
  • --silent, --ni, --noninteractive | Silent - tells RH not to ask for any input when it runs. Defaults to false.
  • -t, --trx, --transaction, --wt, --withtransaction | WithTransaction - This instructs RH to run inside of a transaction. Defaults to false.
  • --simple | RecoveryModeSimple - This instructs RH to set the database recovery mode to simple recovery. Only works with SqlServer. Defaults to false.
  • --debug | Debug - This instructs RH to write out all messages. Defaults to false.
  • --runallanytimescripts, --forceanytimescripts | RunAllAnyTimeScripts - This instructs RH to run any time scripts every time it is run. Defaults to false.
Clone this wiki locally