=encoding UTF-8 =head1 Name sqitch-environment - Environment variables recognized by Sqitch =head1 Description Sqitch supports a number of environment variables that affect its functionality. This document lists them all, along with brief descriptions of their purposes and pointers to relevant documentation. =head2 Sqitch Environment =over =item C Path to the project configuration file. Overrides the default, which is F<./sqitch.conf>. See L for details. =item C Path to the user's configuration file. Overrides the default, which is F<./.sqitch/sqitch.conf>. See L for details. =item C Path to the system's configuration file. Overrides the default, which is a file named C in the directory identified by C. See L for details. =item C The name or URI of the database target to connect to. Overrides values stored in the configuration, but not command-line options or arguments. =item C Username to use when connecting to a database, for those database engines that support authentication. Overrides values stored in a target URI or the configuration. See L for details. =item C Password to use when connecting to a database, for those database engines that support authentication. Overrides values stored in a target URI or the configuration. See L for details. =item C Full name of the current user. Used to identify the user adding a change to a plan file or deploying a change. Supersedes the L variable. =item C Email address of the current user. Used to identify the user adding a change to a plan file or deploying a change. Supersedes the C L variable. =item C Username from the original system. Intended for use by scripts that run Sqitch from another host, where the originating host username should be passed to the execution host, such as L. =item C Full name of the original system user. Intended for use by scripts that run Sqitch from another host, where the originating host user's identity should be passed to the execution host, such as L. This value will be used only when neither the C<$SQITCH_FULLNAME> nor the C L variable is set. =item C Email address of the original user. Intended for use by scripts that run Sqitch on a separate host, where the originating host user's identity should be passed to the execution host, such as L. This value will be used only when neither the C<$SQITCH_EMAIL> nor the C L variable is set. =item C The editor that Sqitch will launch when the user needs to edit some text (a change note, for example). If unset, the C configuration variable will be used. If it's not set, C<$VISUAL> or C<$EDITOR> will be consulted (in that order). Finally, if none of these are set, Sqitch will invoke C on Windows and C elsewhere. =item C The pager program that Sqitch will use when a command (like C) produces multi-page output. If unset, the C configuration variable will be used. If this is also not set, the C environment variable will be used. Finally, if none of these are set, Sqitch will attempt to find and use one of the commonly used pager programs like C and C. =back =head2 Engine Environments In addition to Sqitch's environment variables, some of the database engines support environment variables of their own. These are not comprehensive for all variables supported by a database engine, but document those supported by Sqitch's implementation for each engine. =head3 PostgreSQL, YugabyteDB, CockroachDB All the usual L should be implicitly used. However, the following variables are explicitly recognized by Sqitch: =over =item C The username to use to connect to the server. Superseded by C<$SQITCH_USERNAME> and the target URI username. =item C The password to use to connect to the server. Superseded by C<$SQITCH_PASSWORD> and the target URI password. =item C The PostgreSQL server host to connect to. Superseded by the target URI host name. =item C The PostgreSQL server port to connect to. Superseded by the target URI port. =item C The name of the database to connect to. Superseded by the target URI database name. =back =head3 SQLite SQLite provides no environment variable support. =head3 MySQL Sqitch recognizes and takes advantage of the following L: =over =item C The password to use to connect to the server. Superseded by C<$SQITCH_PASSWORD> and the target URI password. =item C The MySQL server host to connect to. Superseded by the target URI host name. =item C The MySQL server port to connect to. Superseded by the target URI port. =back =head3 Oracle Sqitch's Oracle engine supports a few environment variables: =over =item C Required to point to the Oracle home directory, and contain both the SQL*Plus client and the shared libraries with which the Perl Oracle driver was compiled. =item C The directory in which the Oracle networking interface will find its configuration files, notably F. Defaults to C<$ORACLE HOME/network/admin> if not set. =item C The name of the Oracle database to connect to. Superseded by the target URI. =item C The name of the Oracle database to connect to. Windows only. Superseded by the target URI. =item C The System Identifier (SID) representing the Oracle database to connect to. Superseded by the target URI, C and C on Windows. =back In addition, the Oracle engine in Sqitch explicitly overrides the C and C environment variables. The former is set to C to ensure that all database connections use the UTF-8 encoding. The latter is set to an empty string, to prevent SQL*Plus executing SQL scripts unexpectedly. =head3 Firebird The Sqitch Firebird engine supports the following environment variables: =over =item C The username to use to connect to Firebird. Superseded by C<$SQITCH_USERNAME> and the target URI username. =item C The password to use to connect to Firebird. Superseded by C<$SQITCH_PASSWORD> and the target URI password. =back =head3 Vertica Sqitch provides explicit support for the following L: =over =item C The username to use to connect to the server. Superseded by C<$SQITCH_USERNAME> and the target URI username. =item C The password to use to connect to the server. Superseded by C<$SQITCH_PASSWORD> and the target URI password. =item C The Vertica server host to connect to. Superseded by the target URI host name. =item C The Vertica server port to connect to. Superseded by the target URI port. =item C The name of the database to connect to. Superseded by the target URI database name. =back =head3 Exasol The Sqitch Exasol engine supports no special environment variables. It does, however, override THE C environment variable, to prevent EXAplus executing SQL scripts unexpectedly. =head3 Snowflake Sqitch provides explicit support for the following L: =over =item C The name assigned to the snowflake account. Superseded by the target URI host name. =item C The username to use to connect to the server. Superseded by C<$SQITCH_USERNAME> and the target URI username. =item C The password to use to connect to the server. Superseded by C<$SQITCH_PASSWORD> and the target URI password. =item C The passphrase for the private key file when using key pair authentication. See L for details. =item C The role to use when connecting to the server. Superseded by the target URI database C query parameter. =item C The name of the database to connect to. Superseded by the target URI database name. =item C The warehouse to use. Superseded by the target URI database C query parameter. =item C The Snowflake server host to connect to. Superseded by the target URI host name. Deprecated by Snowflake. =item C The Snowflake server port to connect to. Superseded by the target URI port. Deprecated by Snowflake. =item C The Snowflake region. Superseded by the target URI host name. Deprecated by Snowflake. =back =head1 See Also =over =item * L =item * L =item * L =back =head1 Sqitch Part of the L suite.