Name

sqitch-target - Manage target database configuration

Synopsis

sqitch target [-v | --verbose]
sqitch target add <name> <uri> [-s <property>=<value> ...]
sqitch target set-uri <name> <newuri>
sqitch target set-registry <name> <registry>
sqitch target set-client <name> <client>
sqitch target set-top-dir <name> <directory>
sqitch target set-plan-file <name> <file>
sqitch target set-deploy-dir <name> <directory>
sqitch target set-revert-dir <name> <directory>
sqitch target set-verify-dir <name> <directory>
sqitch target set-extension <name> <extension>
sqitch target remove <name>
sqitch target rename <old> <new>
sqitch target show <name>

Description

Manage the set of databases ("targets") you deploy to. Each target may have a number of properties:

uri

The database connection URI for the target. Required. Its format is:

db:engine:[dbname]
db:engine:[//[user[:password]@][host][:port]/][dbname][?params][#fragment]

Some examples:

db:sqlite:widgets.db
db:pg://dba@example.net/blanket
db:mysql://db.example.com/
db:firebird://localhost//tmp/test.fdb

See the DB URI Draft for details.

registry

The name of the registry schema or database. The default is sqitch.

client

The command-line client to use. If not specified, each engine looks in the OS Path for an appropriate client.

top_dir

The path to the top directory for the target. This directory generally contains the plan file and subdirectories for deploy, revert, and verify scripts. The default is ., the current directory.

plan_file

The plan file to use for this target. The default is $top_dir/sqitch.plan.

deploy_dir

The path to the deploy directory for the target. This directory contains all of the deploy scripts referenced by changes in the plan_file. The default is $top_dir/deploy.

revert_dir

The path to the revert directory for the target. This directory contains all of the revert scripts referenced by changes in the plan_file. The default is $top_dir/revert.

verify_dir

The path to the verify directory for the target. This directory contains all of the verify scripts referenced by changes in the plan_file. The default is $top_dir/verify.

extension

The file name extension to append to change names to create script file names. The default is sql.

Each of these overrides the corresponding engine-specific configuration managed by engine.

Options

-v
--verbose

Be a little more verbose and show the database URI after name.

-s
--set
sqitch target add foo uri=db:pg:try -s top_dir=db -s registry=meta

Set a target property key/value pair. May be specified multiple times. Used only by the add action. Supported keys are:

registry
client
top_dir
plan_file
deploy_dir
revert_dir
verify_dir
extension

Actions

With no arguments, shows a list of existing targets. Several actions are available to perform operations on the targets.

add

Add a target named <name> for the database at <uri>. The --set option specifies target-specific properties.

set-uri

Set the URI for target <name>.

set-registry

Set the registry for target <name>.

set-client

Set the client for target <name>.

set-top-dir

Set the top directory for target <name>.

set-plan-file

Set the plan file for target <name>.

set-deploy-dir

Set the deploy directory for target <name>.

set-revert-dir

Set the revert directory for target <name>.

set-verify-dir

Set the verify directory for target <name>.

set-extension

Set the extension for target <name>.

remove, rm

Remove the target named <name>.

rename

Rename the target named <old> to <new>.

show

Gives some information about the target <name>, including the associated properties. Specify multiple target names to see information for each.

Configuration Variables

The targets are stored in the configuration file, but the command itself currently relies on no configuration variables.

Sqitch

Part of the sqitch suite.