Sensible database change management
Changes for v1.4.1
sqitchtutorial-snowflake.pod
on the need to use URI escapes for special characters. Thanks to Patrick Sabo for the find, and to @marc-marketparts for validating that URI encoding works.sqitch-target.pod
, the main reference for database URLs in the Sqitch documentation.--verbose
twice, as described in the v1.4.0 changes, and not just once. Thanks to Erik Wienhold for the PR (#785)!-VV
. Thanks to Erik Wienhold for the PR (#787)!chmod
. Thanks to Slaven Rezić for the report and the fix (#807)!mysql
client installed by Homebrew on macOS. Thanks to Carlos Ramos for the bug report and PR (#791)!Changes for v1.4.0
--verbose
is specified at least twice. Thanks to @vectro for the PR (#702).0
separators in lists of things (such as %{0}t
for a list of tags). Thanks to @web-vertalo for the pull request (#703).no_prompt
and no_prompt
attributes of App::Sqitch::Engine in favor of passing booleans to the revert
and verify
methods. The attributes still exist for reverse compatibility, but now emit warnings and will be removed in the future. Thanks to Thanks to @vectro for the PR (#704).add
command. Thanks to @blairjordan for the PR (#724)!revert.strict
boolean configuration variable which, when set to true, requires the specification of a change to revert to. It also disables the rebase
and checkout
commands, though the rebase.strict
and checkout.strict
variables, respectively, may override it. Use revert.strict
to prevent accidental reverts in sensitive environments. Thanks to @vectro for the PR (#719; revised in #735)!%F
to sqitch plan
that prints the path for the deploy file for each migration in the plan.sqlplus
client when the ORACLE_HOME
environment variable is set. It now returns either $ORACLE_HOME/bin/sqlplus
or $ORACLE_HOME/sqlplus
if it exists and is executable (and ends in .exe
on Windows). Otherwise it simply returns sqlplus
as before, assuming it will be found in the path. Thanks to @vectro for the suggestion (#747).Changes for v1.3.1
psql
, thus ignoring the PGPORT
environment variable. Thanks to Cam Feenstra for the spot (#675)!\
) in change and tag names. It would be ignored on Unix-style systems, but create unexpected subdirectories on Windows systems./
) in tag names. They're still allowed in change names to enable script organization, but can wreak havoc when used in tag names. Thanks to @ewie for the report (#680)!Changes for v1.3.0
isql
, and when using a local Firebird (e.g., the Engine12 provider), which allows only one connection at a time. Thanks to Slaven Rezić for the the reproducible configuration (#597).sqitch engine update-config
action, originally added for compatibility reasons in 2014, and the prompt to use it was removed as of 0.9999 in 2019.Changes for v1.2.1
local
directory from the distribution, accidentally included in v1.2.0. Thanks to gregor herrmann for the report (#600).Changes for v1.2.0
sqitch -vvv
). Thanks to @wkoszek for the suggestion (#155).AUTHMETHOD
query parameter (to allow Open ID authentication) and the SSLCERTIFICATE=SSL_VERIFY_NONE
query parameter to disable SSL verification. Thanks to Torsten Glunde for the report (#588).--max-count
option when used with --reverse
to show the proper items. Thanks to Adrian Klaver for the report (#517).check
command on Firebird, Exasol, Oracle, and Vertica. Broken since the check
command was added in v1.1.0.-t
option to specify a target, due to a missing dependency declaration in the Target class. Thanks to Clinton Adams for the fix (#509)!--password
option to the MySQL client if it was not read from the .my.cnf
file, as it's more secure to let the client use .my.cnf
, and it eliminates a warning from recent versions of the client. Thanks to Kiel R Stirling for the fix (#484)!engine.$engine.client
config when using the Docker image.check
command, which compares the SHA1 hashes of the deploy scripts to the database, and reports if any have been modified since they were deployed. Thanks to Matthieu Foucault for the pull
request and diligent work on this feature (#477)!--modified
option to the rebase
and revert
commands, to revert to the earliest change with a modified deploy script. Handy for rapid rebasing during iterative development cycles. Thanks to Matthieu
Foucault for this feature (#477)!init
. Thanks to Stack Overflow user vbp13 for the report (#502).sqitch-authentication
, as well as $SNOWSQL_PRIVATE_KEY_PASSPHRASE
in sqitch-environment
. Thanks to Casey Largent for figuring it out (#441).ask_yes_no()
method as a replacement for ask_y_n()
, which is now deprecated. The new method expects localized responses from the user when translations are provided. Defaults to the English "yes" and "no" when no translation is available. Suggested by German translator Thomas Iguchi (#449).show
actions of the target
and engine
commands, fixing a "Negative repeat count does nothing" warning in the process. Thanks to @maximejanssens for the
report (#454).$PGUSER
and $PGPASSWORD
environnement variables, as well as the system username, since libpq does
all that automatically, and collects data from other sources that we did not
(e.g., the password and connection service files). Thanks to Tom Bloor for
the report (issue #410).foo:greeble
, Sqitch would raise an error if foo:greeble
was reworked, suggesting that the dependency be tag-qualified to eliminate
ambiguity. Now reworked dependencies may be required without
tag-qualification, though tag-qualification should still be specified if
functionality as of a particular tag is required.--abort-source-on-error
to the Maria mysql
client to ensure that SQL
errors cause the client to abort with an error so that Sqitch can properly
handle it. Thanks to @mvgrimes for the original report and, years later, the
fix (#209).undef
arguments that should be defined.connections.warehousename
,
connections.dbname
, and connections.rolename
variables in the SnowSQL
configuration file (~/.snowsql/config
) before falling back on the
hard-coded warehouse name "sqitch" and using the system username as the
database name and no default for the role.deploy
detects undeployed dependencies, it now eliminates duplicates
before listing them in the error message.$SQITCH_TARGET
environment variable, which takes
precedence over all other target specifications except for command-line
options and arguments. Thanks to @mvgrimes for the suggestion (#203).core.engine
isn't set unless no targets are found. This lets engines
be determined strictly from command-line arguments -- derived from targets,
or just listed on their own -- whether or not core.engine
is set. This
change eliminates the need for the no_default
parameter to the
parse_args()
method of App::Sqitch Command. It also greatly reduces the
need for the core --engine
option, which was previously required to work
around this issue (see below for its removal).ASSERT()
function for verify scripts to
the Postgres tutorial. Thanks to Sergii Tkachenko for the PR (#425).verify
command now reads deploy.variables
, and individual
verify.variables override
deploy.variables, on the assumption that the verify variables in general ought to be the same as the deploy variables. This makes
verifyvariable configuration consistent with
revert` variable
configuration.--set-deploy
option on the rebase
and checkout
commands no longer apply to both reverts and deploys, but only deploys. Use
the --set
option to apply a variable to both reverts and deploys.--set
option on the init
, engine
,
and target
commands. These commands allow the configuration of database
client variables for specific engines and targets, as well as defaults that
apply to all change execution commands (deploy
, revert
, verify
,
rebase
, and checkout
). The commands merge the variables from each level
in this priority order:
--set-deploy
and --set-revert
options on rebase
and checkout
--set
optiontarget.$target.variables
engine.$engine.variables
deploy.variables
, revert.variables
, and verify.variables
core.variables
See sqitch-configuration
for general documentation of of the hierarchy for
merging variables and the documentation for each command for specifics.--chdir
/--cd
/-C
option to specify a directory to change to
before executing any Sqitch commands. Thanks to Thomas Sibley for the
suggestion (#411).--no-pager
option to disable the pager (#414).--opt=val
syntax instead of --opt val
, so that Sqitch doesn't think
val
is the command. Even in that case, it will search the rest of the
arguments to find a valid command. However, to minimize this challenge, the
documentation now suggests and demonstrates putting all options after the
command, like so: sqitch [command] [options]
.-V
has been
added as an alias for --version
, although -v
remains for now,
undocumented. It may be removed in the future should a compelling use for
-v
in a command be discovered.--registry
, --client
, --db-name
, --db-user
, --db-host
, and
--db-port
(and their aliases) have been moved to the checkout
,
deploy
, log
, rebase
, revert
, status
, upgrade
, and
verify
commands.--plan-file
and --top-dir
(deprecated; see below) have been moved
to the add
, bundle
, checkout
, deploy
, rebase
, revert
,
rework
, show
, status
, tag
, and verify
commands. They were
already supported by the init
, engine
, and target
commands
(where --top-dir
is not deprecated).--verbose
option on the --engine
and --target
commands has been
removed, but no visible change should be apparent, since those commands now
read the core --verbose
option.--dir
alias for --top-dir
has been removed, as it
conflicted with the option of the same name but different meaning in the
init
, engine
, and target
commands.-d
alias for --set-deploy
in the rebase
and checkout
commands
has been changed to -e
so as not to conflict with the -d
alias for
--db-name
.--top-dir
option in favor of --chdir
with a warning
except when used for configuration in the init
, engine
, and target
commands.--deploy-dir
, --revert-dir
, and --verify-dir
options,
which have been deprecated and triggering warnings since v0.9993 (August
2015). The --dir
option to the init
, engine
, and target
commands
remains the favored interface for specifying script directories.--engine
option. The init
command still
supports it, while other commands are able to parse the engine name as an
argument — e.g., sqitch deploy mysql
— or implicitly as part of a target,
as in sqitch revert db:pg:tryme
. When Sqitch is unable to determine the
engine for a command, the error message no longer mentions --engine
and
instead suggests specifying the engine via the target. This option never
triggered an error, but demonstration of its use has been limited to init
examples.core.$engine
configuration, which has been
deprecated with warnings in favor of engine.$engine
since 0.997 (November
2014). The sqitch engine update-config
action remains available to update
old configurations, but may be removed in the future.--deploy
, --revert
, and --verify
options on the add
command, as well as their --no-*
variants. They have been deprecated with
warnings in favor of the --with
and --without
options since v0.990
(January 2014).--deploy-template
, --revert-template
, and
--verify-template
options to the add
command. They have been deprecated
with warnings in favor of the --use
option since v0.990 (January 2014).add.deploy_template
, add.revert_template
, and
add.verify_template
configuration settings. They have been deprecated with
warnings in favor of the add.templates
configuration section since v0.990
(January 2014).@FIRST
and @LAST
symbolic tags, which have been deprecated
with warnings in favor of @ROOT
and @HEAD
, respectively, since 0.997
(November 2014).--to-target
, --upto-target
, which have been deprecated with warnings
in in favor of options containing the string "change", such as --to-change
and --upto-change
, since v0.997 (November 2014).engine
and target
command set-*
actions and their
corresponding methods, which have been deprecated in favor of the alter
action since v0.9993 (August 2015).user
, host
, port
, and dbname
to
App::Sqitch::Target so that command options can be used to easily set them.all_targets
group
constructor on App::Sqitch::Target, so that command-line options can be used
to assign attributes to all targets read from the configuration.target_params
method to App::Sqitch::Command and updated all
commands to use it when constructing targets. This allows commands to define
options for Target parameters, as required for moving options to commands as
described above.class_for
method to App::Sqitch::Command so that the new options
parser described above can load a command class without instantiating an
instance. Useful for searching command-line arguments for a command name.create
constructor to App::Sqitch::Command to let Sqitch
instantiate an instance of a command once it finds one via class_for
.
Previously, Sqitch used the load
method, which handled the functionality
of both class_for
and create
. That method still exists but is used only
in tests.--top-dir
triggers a warning.verbosity
attribute from App::Sqitch::Command::engine and
App::Sqitch::Command::target, since the --verbose
option is no longer
needed. These commands now rely on the core --verbose
option.config
parameter to the
all_targets
constructor of App::Sqitch::Target, since it was never used by
Sqitch. It always fetched the config from the required sqitch
parameter.
Support for the config
parameter has not been removed, since third-parties
might use it.set_*
methods in the engine
and target
commands, which
have been deprecated in favor of the new alter
method since v0.9993
(August 2015).old_id
and old_info
methods from Change and Tag, which date
from v0.940 (December 2012), and were provided only to allow existing
Postgres databases to be updated from the old to new ID format, now removed.
There should be no other use case for these methods.