Command Options
Many of the options are generally applicable to many commands. Some options have both a short form and a long form – for example, the long form of the assignContexts option is --assignContexts (two hyphens), but you can also use the short form -ac (one hyphen).
To get help on general options, run this command:
hammer help options
Options are used in a hammer command:
usage: hammer [<hammer-option>] <command-name> <option>
If option arguments contain spaces, they must be enclosed in quotes:
hammer modifyChangeSet --action=ADD label=history --searchLabels="(cliLabel1 AND cliLabel2) AND (dbdefLabel1 OR dbdefLabel2 OR dbdefLabel3)"
Option (short, long) | <arg> | Description |
---|---|---|
--action | Action to take, one of:
| Specifies the action to take in the modifyChangeSet command. |
| Complex context expression. | Assign the given contexts to changesets generated by diffChangelog command. Accepts a complex context expression. |
-al --assignLabels <arg> | Comma-separated list of labels | Assign the given labels to changesets generated by diffChangelog command. Accepts a comma separated list of labels. |
-amf --metadataFile | File name | Assign metadata file name. |
-aml --label | Label name | Label name for assign metadata. |
| Context name | Context to use for operation default: <all contexts> |
-D <property=value> | Java property assignment | Set a Java system property |
| One of:
| Deployment threshold setting <arg> is one of stopOnError, stopOnWarn, alwaysDeploy default: stopOnError |
| One of:
| Overrides the
|
-e --externalStoredLogic | true | false | Use external stored logic |
| List of stored logic objects | List of stored logic objects to exclude from a snapshot. Values can be none (the default), all, or a comma-separated list of these values: procedure, package, packagebody, function, trigger, view. |
-f --force | none | When used with deploy, forces deploy even if not all operations can be rolled back. When used with versionChangeLog, forces XML header validation default: <off> |
-fo --format <arg> | One of:
| Format of the database snapshot. default: dbobject |
-g --genSQL | none | Generate SQL for changes default: <off> |
-gr --genRollbackSQL | none | Generate rollback SQL for changes default: <off> |
-i --includeStorageOptions <arg> | true | false | Include storage options |
-iv --invalidsCheck <arg> | One of:
| Validate stored logic |
-j --drivers <arg> | List of jar files or directory containing jar files | Driver jars or directory containing jars. |
-l --log <arg> | Directory | Absolute or relative path to directory location for logs & reports for the operation DEPRECATED: Please use the -r --report option instead |
-lb --labels <arg> | Comma-separated list of labels | Label to use for operation |
-lc --lookupChangesets <arg> | Expression | Label expression to use for change set lookup Note that label expressions must be enclosed in quotes when used as CLI parameter options. For example, --lookupChangesets="(cliLabel1 AND cliLabel2) AND (dbdefLabel1 OR dbdefLabel2 OR dbdefLabel3)" |
-lcs --limit <arg> | Number | Controls the number of changesets listed in each section of the statusDetails output. |
-lf --limitForecast | true | false | Overrides the
|
-ma --matchAll <arg> | none | All script chucksums must match for change set lookup. |
-ml --mergeLabels <arg> | One of:
| Specifies how to combine the labels that are specified in the Step with the labels that are specified on the command line.
|
--modifyContexts | One or a comma-separated list of context names | Specifies values to add or remove in the |
--modifyIgnore | N/A | Specifies the change to the
|
--modifyLabels | One or a comma-separated list of labels. | Specifies values to add or remove in the |
-np --noPrompt | none | Do not prompt for input. |
-o --output <arg> | File or directory | Specifies the location of the output file. The semantics differ per command (diff, diffChangelog, snapshot) |
-p --project <arg> | Directory | Project directory default: current working directory |
-pl --pipeline <arg> | Pipeline name | Pipeline name to use for deploy, changelogSync, and rollback commands |
-ps --persistSnapshots <arg> | none | Persist (save) snapshots of live databases during diff. |
-pw <databaseName:::password> | Password | Password for the database username (-un ). |
| none | Send output to debug log only |
-r --report <arg> | Directory | Absolute or relative path to directory location for reports & log for the operation. |
-rpw <password> --targetPassword <password> | Password | Password for the reference database user name Required when the |
-ru <username> -referenceUsername <username> | User name | Reference database user name. Used only in two-credential commands (diff, diffChangeLog). Required when the |
-sc --scriptChecksum <arg> | Checksum (number) | Script checksum to use for addLabels and removeLabels commands. |
--searchContexts | One or a comma-separated list of context names | Search the contexts changeset attribute for the specified values in the modifyChangeSet command. |
--searchIds | One or a comma-separated list of changeset IDs | Search the id changeset attribute for the specified values. Use the GUI or hammer statusDetails to see a list of changeset IDs for a project. |
--searchIgnore | true | false | Search the Note: Searches for a false value also return changesets where the |
--searchLabels | One or a comma-separated list of labels or a label expression | Search the Note that label expressions must be enclosed in quotes when used as CLI parameter options. For example, --searchLabels="(cliLabel1 AND cliLabel2) AND (dbdefLabel1 OR dbdefLabel2 OR dbdefLabel3)" |
--searchOrigFileNames | One or a comma-separated list of filenames | Search the o rigFileName changeset attribute for the specified values in the modifyChangeSet command. |
--searchOrigFilePaths | One or a comma-separated list of file paths | Search the o rigFilePath changeset attribute for the specified values in the modifyChangeSet command. |
--searchVersion | One or a comma-separated list of versions | Search the version changeset attribute for the specified values in the modifyChangeSet command. |
-ssl --snapshotSchemaList <arg> | Comma-separated list of schema names | List of schemas to snapshot |
--storageOptionsScope <arg> | One of:
| Specifies the scope of storage information used for all steps/dbdefs in the project. You must also specify that storage information be used for the step/dbdef using the following command:
|
-tpw <password> --targetPassword <password> | Password | Password for the target database user name. |
-tu <username> --targetUsername <username> | User name | Target database user name. Required when the |
-un | User name | Database user name. Required when the Use -pw to specify the password for the database user. |
-v --version | none | Print version info. |
Copyright © Liquibase 2012-2022 - Proprietary and Confidential