Name
sqitch-engine - Manage database engine configuration
Synopsis
sqitch engine
sqitch engine [-v | --verbose]
sqitch engine add <name> [engine-options]
sqitch engine alter <name> [engine-options]
sqitch engine remove <name>
sqitch engine show <name>
Description
Manage the database engines you deploy to. The list of supported engines includes:
firebirdmysqloraclepgsqliteverticaexasolsnowflakecockroachclickhouse
Each engine may have a number of properties:
-
targetThe name or URI of the database target. Note that if the value is a URI, the engine in the URI must match the engine being added or altered. The default is
db:$engine. See sqitch-target for details on target configuration. -
registryThe name of the registry schema or database. The default is
sqitch. -
clientThe command-line client to use. If not specified, each engine looks in the OS Path for an appropriate client.
-
top_dirThe path to the top directory for the engine. This directory generally contains the plan file and subdirectories for deploy, revert, and verify scripts, as well as reworked instances of those scripts. The default is
., the current directory. -
plan_fileThe plan file to use for this engine. The default is
$top_dir/sqitch.plan. -
deploy_dirThe path to the deploy directory for the engine. This directory contains all of the deploy scripts referenced by changes in the
plan_file. The default is$top_dir/deploy. -
revert_dirThe path to the revert directory for the engine. This directory contains all of the revert scripts referenced by changes in the
plan_file. The default is$top_dir/revert. -
verify_dirThe path to the verify directory for the engine. This directory contains all of the verify scripts referenced by changes in the
plan_file. The default is$top_dir/verify. -
reworked_dirThe path to the reworked directory for the engine. This directory contains all subdirectories for all reworked scripts referenced by changes in the
plan_file. The default is$top_dir. -
reworked_deploy_dirThe path to the reworked deploy directory for the engine. This directory contains all of the reworked deploy scripts referenced by changes in the
plan_file. The default is$reworked_dir/deploy. -
reworked_revert_dirThe path to the reworked revert directory for the engine. This directory contains all of the reworked revert scripts referenced by changes in the
plan_file. The default is$reworked_dir/revert. -
reworked_verify_dirThe path to the reworked verify directory for the engine. This directory contains all of the reworked verify scripts referenced by changes in the
plan_file. The default is$reworked_dir/verify. -
extensionThe file name extension to append to change names to create script file names. The default is
sql.
Each of these overrides the corresponding core configuration – for example,
the core.target, core.plan_file, core.registry, and core.client
config options.
Options
- List Option
-
-v -
--verbosesqitch engine --verboseBe more verbose when listing engines.
-
- Add and Alter Options
-
--top-dirsqitch engine add pg --top-dir sqlSpecifies the top directory to use for the engine. Typically contains the deployment plan file and the change script directories.
-
--plan-file -
-fsqitch engine add pg --plan-file my.planSpecifies the path to the deployment plan file. Defaults to
$top_dir/sqitch.plan. -
--extensionsqitch engine add pg --extension ddlSpecifies the file name extension to use for change script file names. Defaults to
sql. -
--dirsqitch engine add pg --dir deploy=dep --dir revert=rev --dir verify=tstSets the path to a script directory. May be specified multiple times. Supported keys are:
deployrevertverifyreworkedreworked_deployreworked_revertreworked_verify
-
--targetsqitch engine add pg --target db:pg:widgetsSpecifies the name or URI of the target database for the engine.
-
--registrysqitch engine add pg --registry metaSpecifies the name of the database object where Sqitch’s state and history data is stored. Typically a schema name (as in PostgreSQL and Oracle) or a database name (as in SQLite and MySQL). Defaults to
sqitch. -
--clientsqitch engine add pg --client /usr/local/pgsql/bin/psqlSpecifies the path to the command-line client for the engine. Defaults to a client in the current path named appropriately for the engine.
-
-s -
--setSet a variable name and value for use by the database engine client, if it supports variables. The format must be
name=value, e.g.,--set defuser='Homer Simpson'.
-
Actions
With no arguments, shows a list of existing engines. Several actions are available to perform operations on the engines.
add
Add an engine named <name> for the database at <uri>. The
--set option specifies engine-specific properties. A new plan file and
new script script directories will be created if they don’t already exist.
alter
Alter an engine named <name>. The --set option specifies
engine-specific properties to set. New script script directories will be
created if they don’t already exist.
remove, rm
Remove the engine named <name> from the configuration. The plan file
and script directories will not be affected.
show
Gives some information about the engine <name>, including the
associated properties. Specify multiple engine names to see information for
each.
Configuration Variables
The engines are stored in the configuration file, but the command itself currently relies on no configuration variables.
Sqitch
Part of the sqitch suite.
