sqitch-target(3pm) | User Contributed Perl Documentation | sqitch-target(3pm) |
sqitch-target - Manage target database configuration
sqitch target sqitch target [-v | --verbose] sqitch target add <name> <uri> [-s <property>=<value> ...] sqitch target alter <name> [-s <property>=<value> ...] sqitch target remove <name> sqitch target rename <old> <new> sqitch target show <name> [...]
Manage the set of databases ("targets") you deploy to. Each target may have a number of properties:
db:engine:[dbname] db:engine:[//[user[:password]@][host][:port]/][dbname][?params][#fragment]
Some examples:
See the DB URI Draft <https://github.com/libwww-perl/uri-db> for details.
Each of these overrides the corresponding engine-specific configuration managed by engine.
sqitch target --verbose
Be more verbose when listing targets.
sqitch target add devwidgets --uri db:pg:widgets
Specifies the URI <https://github.com/libwww-perl/uri-db/> of the target database.
sqitch target add devwidgets --top-dir sql
Specifies the top directory to use for the target. Typically contains the deployment plan file and the change script directories.
sqitch target add devwidgets --plan-file my.plan
Specifies the path to the deployment plan file. Defaults to "$top_dir/sqitch.plan".
sqitch target add devwidgets --extension ddl
Specifies the file name extension to use for change script file names. Defaults to "sql".
sqitch target add devwidgets --dir deploy=dep --dir revert=rev --dir verify=tst
Sets the path to a script directory. May be specified multiple times. Supported keys are:
sqitch target add devwidgets --registry meta
Specifies 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".
sqitch target add devwidgets --client /usr/local/pgsql/bin/psql
Specifies the path to the command-line client for the target. Defaults to a client in the current path named appropriately for the engine specified by the URI.
With no arguments, shows a list of existing targets. Several actions are available to perform operations on the targets.
Add a target named "<name>" for the database at "<uri>". The "--set" option specifies target-specific properties. A new plan file and new script script directories will be created if they don't already exist.
Alter target 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 the target named "<name>". The plan file and script directories will not be affected.
Rename the target named "<old>" to "<new>".
Gives some information about the target "<name>", including the associated properties. Specify multiple target names to see information for each.
The targets are stored in the configuration file, but the command itself currently relies on no configuration variables.
Part of the sqitch suite.
2022-10-15 | perl v5.34.0 |