.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "sqitch-verify 3pm" .TH sqitch-verify 3pm 2024-02-08 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH Name .IX Header "Name" sqitch-verify \- Verify deployed database changes .SH Synopsis .IX Header "Synopsis" .Vb 4 \& sqitch verify [options] [] \& sqitch verify [options] \-\-from\-change \& sqitch verify [options] \-\-to\-change \& sqitch verify [options] \-\-from\-change \-\-to\-change .Ve .SH Description .IX Header "Description" Verify that a database is valid relative to the plan and the verification scripts for each deployed change. .PP More specifically, \f(CW\*(C`verify\*(C'\fR iterates over all deployed and planned changes (or the subset identified by \f(CW\*(C`\-\-from\-change\*(C'\fR and/or \f(CW\*(C`\-\-to\-change\*(C'\fR) and checks that each: .IP \(bu 4 Is deployed. .IP \(bu 4 Is present in the plan. .IP \(bu 4 Was deployed in the proper order. .IP \(bu 4 Passes its verify test, if one exists and the change has not been reworked. .PP The \f(CW\*(C`\*(C'\fR parameter specifies the database to which to connect, and may also be specified as the \f(CW\*(C`\-\-target\*(C'\fR option. It can be target name, a URI, an engine name, or plan file path. .PP Verify tests are scripts that may be associated with each change. If a change has no verify script, a warning is emitted, but it is not considered a failure. If a change has been reworked, only the most recent reworking will have its verify script executed. .PP Verify scripts should make no assumptions about the contents of the database, as unit tests might. Rather, their job is to ensure that the state of a database is correct after a deploy script has completed. Verify scripts are run through the database engine command-line client, just like deploy and revert scripts. They should cause the client to exit with a non-zero exit code if they fail. .SH Options .IX Header "Options" .ie n .IP """\-t""" 4 .el .IP \f(CW\-t\fR 4 .IX Item "-t" .PD 0 .ie n .IP """\-\-target""" 4 .el .IP \f(CW\-\-target\fR 4 .IX Item "--target" .PD The target database to which to connect. This option can be either a URI or the name of a target in the configuration. .ie n .IP """\-\-from\-change""" 4 .el .IP \f(CW\-\-from\-change\fR 4 .IX Item "--from-change" .PD 0 .ie n .IP """\-\-from""" 4 .el .IP \f(CW\-\-from\fR 4 .IX Item "--from" .PD Specify the change with which to start the verification. Defaults to the earliest deployed change. See sqitchchanges for the various ways in which changes can be specified. .ie n .IP """\-\-to\-change""" 4 .el .IP \f(CW\-\-to\-change\fR 4 .IX Item "--to-change" .PD 0 .ie n .IP """\-\-to""" 4 .el .IP \f(CW\-\-to\fR 4 .IX Item "--to" .PD Specify the change with which to complete the verification. Defaults to the last deployed change. See sqitchchanges for the various ways in which changes can be specified. .ie n .IP """\-s""" 4 .el .IP \f(CW\-s\fR 4 .IX Item "-s" .PD 0 .ie n .IP """\-\-set""" 4 .el .IP \f(CW\-\-set\fR 4 .IX Item "--set" .PD Set a variable name and value for use by the database engine client, if it supports variables. The format must be \f(CW\*(C`name=value\*(C'\fR, e.g., \&\f(CW\*(C`\-\-set defuser=\*(AqHomer Simpson\*(Aq\*(C'\fR. Overrides any values loaded from "configuration Variables". .ie n .IP """\-\-registry""" 4 .el .IP \f(CW\-\-registry\fR 4 .IX Item "--registry" .Vb 1 \& sqitch verify \-\-registry registry .Ve .Sp The name of the Sqitch registry schema or database in which sqitch stores its own data. .ie n .IP """\-\-db\-client""" 4 .el .IP \f(CW\-\-db\-client\fR 4 .IX Item "--db-client" .PD 0 .ie n .IP """\-\-client""" 4 .el .IP \f(CW\-\-client\fR 4 .IX Item "--client" .PD .Vb 1 \& sqitch verify \-\-client /usr/local/pgsql/bin/psql .Ve .Sp Path to the command-line client for the database engine. Defaults to a client in the current path named appropriately for the database engine. .ie n .IP """\-d""" 4 .el .IP \f(CW\-d\fR 4 .IX Item "-d" .PD 0 .ie n .IP """\-\-db\-name""" 4 .el .IP \f(CW\-\-db\-name\fR 4 .IX Item "--db-name" .PD .Vb 2 \& sqitch verify \-\-db\-name widgets \& sqitch verify \-d bricolage .Ve .Sp Name of the database. In general, targets and URIs are preferred, but this option can be used to override the database name in a target. .ie n .IP """\-u""" 4 .el .IP \f(CW\-u\fR 4 .IX Item "-u" .PD 0 .ie n .IP """\-\-db\-user""" 4 .el .IP \f(CW\-\-db\-user\fR 4 .IX Item "--db-user" .ie n .IP """\-\-db\-username""" 4 .el .IP \f(CW\-\-db\-username\fR 4 .IX Item "--db-username" .PD .Vb 3 \& sqitch verify \-\-db\-username root \& sqitch verify \-\-db\-user postgres \& sqitch verify \-u Mom .Ve .Sp User name to use when connecting to the database. Does not apply to all engines. In general, targets and URIs are preferred, but this option can be used to override the user name in a target. .ie n .IP """\-h""" 4 .el .IP \f(CW\-h\fR 4 .IX Item "-h" .PD 0 .ie n .IP """\-\-db\-host""" 4 .el .IP \f(CW\-\-db\-host\fR 4 .IX Item "--db-host" .PD .Vb 2 \& sqitch verify \-\-db\-host db.example.com \& sqitch verify \-h appdb.example.net .Ve .Sp Host name to use when connecting to the database. Does not apply to all engines. In general, targets and URIs are preferred, but this option can be used to override the host name in a target. .ie n .IP """\-p""" 4 .el .IP \f(CW\-p\fR 4 .IX Item "-p" .PD 0 .ie n .IP """\-\-db\-port""" 4 .el .IP \f(CW\-\-db\-port\fR 4 .IX Item "--db-port" .PD .Vb 2 \& sqitch verify \-\-db\-port 7654 \& sqitch verify \-p 5431 .Ve .Sp Port number to connect to. Does not apply to all engines. In general, targets and URIs are preferred, but this option can be used to override the port in a target. .ie n .IP """\-\-plan\-file""" 4 .el .IP \f(CW\-\-plan\-file\fR 4 .IX Item "--plan-file" .PD 0 .ie n .IP """\-f""" 4 .el .IP \f(CW\-f\fR 4 .IX Item "-f" .PD .Vb 1 \& sqitch verify \-\-plan\-file my.plan .Ve .Sp Path to the deployment plan file. Overrides target, engine, and core configuration values. Defaults to \fR\f(CI$top_dir\fR\fI/sqitch.plan\fR. .SH "Configuration Variables" .IX Header "Configuration Variables" .ie n .IP """[deploy.variables]""" 4 .el .IP \f(CW[deploy.variables]\fR 4 .IX Item "[deploy.variables]" .PD 0 .ie n .IP """[verify.variables]""" 4 .el .IP \f(CW[verify.variables]\fR 4 .IX Item "[verify.variables]" .PD A section defining database client variables. The \f(CW\*(C`deploy.variables\*(C'\fR configuration is read from the \f(CW\*(C`deploy\*(C'\fR command configuration, on the assumption that the values will generally be the same on verify. If they're not, use \f(CW\*(C`verify.variables\*(C'\fR to override \f(CW\*(C`deploy.variables\*(C'\fR. .Sp These variables are useful if your database engine supports variables in scripts, such as PostgreSQL's \&\f(CW\*(C`psql\*(C'\fR variables , Vertica's \&\f(CW\*(C`vsql\*(C'\fR variables , MySQL's user variables , SQL*Plus's \&\f(CW\*(C`DEFINE\*(C'\fR variables , and Snowflake's SnowSQL variables . .Sp May be overridden by \f(CW\*(C`\-\-set\*(C'\fR or target and engine configuration. Variables are merged in the following priority order: .RS 4 .ie n .IP """\-\-set""" 4 .el .IP \f(CW\-\-set\fR 4 .IX Item "--set" .PD 0 .ie n .IP """target.$target.variables""" 4 .el .IP \f(CWtarget.$target.variables\fR 4 .IX Item "target.$target.variables" .ie n .IP """engine.$engine.variables""" 4 .el .IP \f(CWengine.$engine.variables\fR 4 .IX Item "engine.$engine.variables" .ie n .IP """verify.variables""" 4 .el .IP \f(CWverify.variables\fR 4 .IX Item "verify.variables" .ie n .IP """deploy.variables""" 4 .el .IP \f(CWdeploy.variables\fR 4 .IX Item "deploy.variables" .ie n .IP """core.variables""" 4 .el .IP \f(CWcore.variables\fR 4 .IX Item "core.variables" .RE .RS 4 .RE .PD .SH Sqitch .IX Header "Sqitch" Part of the sqitch suite.