Releases: sqitchers/sqitch
Releases · sqitchers/sqitch
Release v1.4.1
Changes for v1.4.1
- Removed the quoting of the role and warehouse identifiers that was added to the Snowflake engine in v1.4.0. Turns out Snowflake allows a warehouse to be specified in a different database, in which case dots are valid in the name and should not be quoted! So users must properly quote when necessary, but added notes to
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. - Added notes on URL encoding database URLs to
sqitch-target.pod
, the main reference for database URLs in the Sqitch documentation. - Fixed the output of the list of changes to be deployed or reverted to actually require
--verbose
twice, as described in the v1.4.0 changes, and not just once. Thanks to Erik Wienhold for the PR (#785)! - Removed the duplicate change name from the output of the list of changes to be deployed or reverted with
-VV
. Thanks to Erik Wienhold for the PR (#787)! - Fixed invalid template resolution when adding a singe change to multiple engines at once. Thanks to Christian Riedel for the detailed bug report (#795)!
- Fixed Oracle and Firebird test failures due to incorrect use of
chmod
. Thanks to Slaven Rezić for the report and the fix (#807)! - Tests now require Test::Warn 0.31 or later, as newline handling issues cause test failures in earlier versions. Thanks to Slaven Rezić for the test reports and for identifying the issue.
- Updated the locale configuration to fix issues in more recent versions of Perl, and added tests to ensure that the sqitch CLI executes and properly emits localized messages (except on Windows, where the language codes are incompatible).
- Fixed an issue where the MySQL engine failed to recognize the MariaDB
mysql
client installed by Homebrew on macOS. Thanks to Carlos Ramos for the bug report and PR (#791)!
Release v1.4.0
Changes for v1.4.0
- Fixed Snowflake warehouse and role setup to properly quote identifiers unless they're valid unquoted identifiers or already quoted. Thanks to @marc-marketparts for the report (#685).
- Fixed a bug reworking a change when a rework directory is configured but not created. Thanks to @jfeaver for the report (#686).
- Output the list of changes to be deployed or reverted when
--verbose
is specified at least twice. Thanks to @vectro for the PR (#702). - Fixed the formatting of the log and plan commands to allow empty or
0
separators in lists of things (such as%{0}t
for a list of tags). Thanks to @web-vertalo for the pull request (#703). - Updated the MySQL Tutorial to use 5.7 features. Thanks to Vlad Safronov for the PR (#705).
- Deprecated the
no_prompt
andno_prompt
attributes of App::Sqitch::Engine in favor of passing booleans to therevert
andverify
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). - Added a warning for a double extension on the file names created by the
add
command. Thanks to @blairjordan for the PR (#724)! - Added the
revert.strict
boolean configuration variable which, when set to true, requires the specification of a change to revert to. It also disables therebase
andcheckout
commands, though therebase.strict
andcheckout.strict
variables, respectively, may override it. Userevert.strict
to prevent accidental reverts in sensitive environments. Thanks to @vectro for the PR (#719; revised in #735)! - Fixed test failures due to a bug fix in the Perl URI module (libwww-perl/URI#13). Thanks to @bobfang for the report (#744)!
- Fixed test failures due to a change in the generation of DBI DSN by URI::Oracle introduced by libwww-perl/URI-db#23.
- Added a format option
%F
tosqitch plan
that prints the path for the deploy file for each migration in the plan. - Changed the default location for the Oracle
sqlplus
client when theORACLE_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 returnssqlplus
as before, assuming it will be found in the path. Thanks to @vectro for the suggestion (#747). - Increased the required version of DBI to 1.631 or higher and removed a MySQL engine workaround for older versions.
- Added detection of a missing registry schema on connect and conditions to avoid querying it when it does not exist. Fixes an issue where Sqitch might find a project record in the current schema instead of the expected registry schema. Thanks to @vectro for the report and investigation (#668)!
- Fixed Snowflake and MySQL to properly raise errors on session query failures immediately after connection.
- Fixed the handling of unique violations for deploy script hash uniqueness so that it no longer returns a database error but properly reports the issue in a more human-friendly error message. Thanks to Stefan Badenhorst for the reminder (#630).
- Updated the registry SQL scripts for Vertica to always enable primary key and unique constraints. Unique constraints are now enabled for all database engines except Exasol and Snowflake.
- Dropped support for Vertica 7.1, as unique constraint enforcement was not added until Vertica 7.2.
- Increased minimum SQLite versions to 3.8.6, when unique constraint enforcement was added.
- Removed remaining uses of the smartmatch operator, thus eliminating the Perl 5.38 warnings about its deprecation. (#769)
- Added Cockroach to the list of valid engines recognized in command-line arguments (and a test to ensure new engines won't be omitted in the future). Thanks to @NOBLES5E for the spot (#772)!
Release v1.3.1
Changes for v1.3.1
- Fixed a bug introduced in v1.3.0 where the Postgres engine would always pass the port to
psql
, thus ignoring thePGPORT
environment variable. Thanks to Cam Feenstra for the spot (#675)! - Fixed test failures on OSes where the local time zone cannot be determined. Thanks to Slaven Rezić for the test reports, and to Dave Rolsky for the solution (#672).
- Updated the MySQL deploy/revert lock to be specific to the target database. This allows multiple instances of Sqitch to run at the same time on the same server as long as they're connecting to different databases. Thanks to Dmytro Kh for the report and discussion of the options (#670).
- Fixed test failures where DBD::Mem was not installed. Likely only occurred on some CPAN Testers nodes. Thanks to Slaven Rezić for those (#673).
- Banned the backslash character (
\
) in change and tag names. It would be ignored on Unix-style systems, but create unexpected subdirectories on Windows systems. - Banned the slash character (
/
) 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)!
Release v1.3.0
Changes for v1.3.0
- Fixed an issue when testing Firebird on a host with Firebird installed but no
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). - Tweaked the Postgres engine to support Yugabyte. The only unsupported features are explicit locks, so users need to manually ensure that only one instance of Sqitch is updating the cluster at a time.
- Added support for CockroachDB. Almost exactly the same as for Postgres, so the new App::Sqitch::Engine::cockroach class extends App::Sqitch::Engine::pg to make a few changes. The SQL files with the registry DDL varies in a few ways, so they're separate.
- Now require URI::db v0.20 for Cockroach and Yugabyte URI support.
- Dropped support for MySQL 5.0.
- Added explicit sorting for aggregated lists (such as the tags associated with a commit) to the MySQL, Exasol, Snowflake, and Postgres (8.4 and higher) engines.
- Fixed slow deploys on MariaDB thanks to fractional timestamp support added in 5.03.05. Thanks to @rbrigot for the PR (#658)!
- Fixed a bug where destination locking failed on the first deploy to MySQL. Bug introduced along with destination locking in v1.2.0. Thanks Tom Bloor the report and to Alberto Simões for the help replicating the issue (#601).
- Removed the
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. - Fixed a warning when searching for the Firebird client on Windows.
Sqitch v1.2.1
Changes for v1.2.1
- Updated all the live engine tests, aside from Oracle, to test with unique registry names, so as to avoid conflicts when multiple instances are being tested at once. Thanks to Slaven Rezić for the report (#597).
- Removed
local
directory from the distribution, accidentally included in v1.2.0. Thanks to gregor herrmann for the report (#600).
Release v1.2.0
Changes for v1.2.0
- Fixed partitioned search for deployed changes on Oracle and Exasol to correctly support plans with more than 250 changes. Thanks to @Nicqu for the report (#521).
- DBI connections to the registry will now be set to trace level one when a verbosity level of three or higher is passed to Sqitch (i.e.,
sqitch -vvv
). Thanks to @wkoszek for the suggestion (#155). - Renamed the "master" branch to "main" and updated all relevant references.
- Fixed the parsing of the Snowflake account name from the target URL to that it no longer strips out the region and cloud platform parts. Also deprecated the use of the region, host, and port config and environment variables. This is to comply with the new account name format. Thanks to @ldsingh00 for the report (#544).
- The checkout command will now show a usage statement when no branch name is passed to it, rather than a series of warnings and a Git error. Thanks to François Beausoleil for the report (#561).
- The checkout command now works when operating on a Sqitch project in a subdirectory of a Git project. Thanks to François Beausoleil for the report and suggested fix (#560).
- Fixed a failing bundle test when a top directory was configured in the user or system configuration. Thanks to @CodingMinds for the spot (#587).
- Added support to the Exasol engine for the
AUTHMETHOD
query parameter (to allow Open ID authentication) and theSSLCERTIFICATE=SSL_VERIFY_NONE
query parameter to disable SSL verification. Thanks to Torsten Glunde for the report (#588). - Fixed "Use of uninitialized value $engine in concatenation" error when Sqitch is unable to determine the engine when writing a plan file. Only happens in the rare case that the core.engine value is not set.
- Improved the error message when attempting to update a plan file and no project pragma is present. Thanks to Laurentiu Diaconu for the report (#577).
- Fixed the error message when attempting to deploy a change that has already been deployed to display the name of the change, rather than a memory address. Thanks to Neil Mayhew for the report (#579).
- Added destination locking, currently implemented for PostgresQL and MySQL. On starting a deploy or revert, Sqitch attempts to "lock the destination" using advisory locks, to ensure that only one instance of Sqitch makes changes to the database at any one time. This complements the existing locking, which applies as each change is deployed or reverted, as that pattern led to failures when multiple instances of Sqitch were working at once. Thanks to Neil Mayhew for the report (#579).
- Added the --lock-timeout option to the deploy, revert, rebase, and checkout commands, to allow for shorter or longer times to wait for an exclusive target database advisory lock for engines that support it. Defaults to 60 seconds.
- Fixed the behavior of the plan command's
--max-count
option when used with--reverse
to show the proper items. Thanks to Adrian Klaver for the report (#517). - Fixed an issue that could cause bugs with the
check
command on Firebird, Exasol, Oracle, and Vertica. Broken since thecheck
command was added in v1.1.0.
Sqitch v1.1.0
Changes since v1.0.0
- Fixed Perl Pod errors, thanks to a pull request from Mohammad S Anwar (#470).
- Fixed test failures when running with the localization set to German or Italian. Thanks to Slaven Rezić for the report (#472).
- Fixed an issue when the full name of the current user is not set, so that it properly falls back on the username. Thanks to Slaven Rezić and Matthieu Foucault for the report and testing various fixes (#473).
- Eliminated an error when using the
-t
option to specify a target, due to a missing dependency declaration in the Target class. Thanks to Clinton Adams for the fix (#509)! - Updated the IPC::System::Simple Win32 workaround added in 0.9999 to properly support released versions of IPC::System::Simple. This fixes errors running the database command-line clients on Windows (#503).
- Sqitch now only passes the
--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)! - Added a note to the tutorials to skip setting the
engine.$engine.client
config when using the Docker image. - Added the new
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)! - Added the
--modified
option to therebase
andrevert
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)! - Fixed an issue where the Snowflake engine would complain about not finding the account name even for commands that don't need them, such as
init
. Thanks to Stack Overflow user vbp13 for the report (#502).
Sqitch v1.0.0
Changes since v0.9999
- Fixed test failure due to a hard-coded system error that may be localized on non-en-US hosts. Thanks to Slaven Rezić for the catch (#427).
- Now require Test::MockModule 0.17 to silence a warning during testing. Thanks to Slaven Rezić for the suggestion.
- Fixed an error when Sqitch is run with no arguments. Thanks to Henrik Tudborg for the report (#428).
- Fixed missing dependency on IO::Pager in the distribution metadata.
- Removed use of File::HomeDir, thanks to a PR from Karen Etheridge (#433).
- Updated the tagline from "Sane database change management" to "Sensible database change management" out of sensitivity to those subject to mental illness (#435).
- Removed double-quoting of SQLite commands on Windows, inadvertently added by the workaround for Windows quoting in v0.9999.
- Fixed a Snowflake issue where Sqitch failed to recognize the proper error code for a missing table and therefore an uninitialized registry. Thanks to @lerouxt and @kulmam92 for the report and fix (#439).
- Added check for project initialization when no engine config can be found. When run from a directory with no configuration, Sqitch now reports that the project is not initialized instead of complaining about a lack of engine config (#437).
- Documented Snowflake key pair authentication in
sqitch-authentication
, as well as$SNOWSQL_PRIVATE_KEY_PASSPHRASE
insqitch-environment
. Thanks to Casey Largent for figuring it out (#441). - Added the German localization. Thanks to Thomas Iguchi for the pull request (#451).
- Renamed the French localization from "fr" to "fr_FR", so that systems will actually find it.
- Added the
ask_yes_no()
method as a replacement forask_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). - Fixed a bug where only project without a URI was allowed in the registry. Thanks to Conding-Brunna for the report (#450).
- Clarified the role of project URIs for uniqueness: They don't allow multiple projects with the same name, but do prevent the deployment of a project with the same name but different URI.
- Fixed an issue where target variables could not be found when a target name was not lowercase. Thanks to @maximejanssens for the report (#454).
- Now require Config::GitLike 1.15 or higher.
- Fixed the indentation of variables emitted by the
show
actions of thetarget
andengine
commands, fixing a "Negative repeat count does nothing" warning in the process. Thanks to @maximejanssens for the
report (#454). - Fixed a Snowflake test failure when the current system username has a space or other character requiring URI escaping. Thanks to Ralph Andrade for the report (#463).
- Fixed an issue where a wayward newline in some versions of SQLite prevented Sqitch from parsing the version. Thanks to Kivanc Yazan for the report (#465) and the fix (#465)!
- Fixed an error when Sqitch was run on a system without a valid username, such as some Docker environments. Thanks to Ferdinand Salis for the report (#459)!
- When Sqitch finds the registry does not exist on PostgreSQL, it now sends a warning to the PostgreSQL log reporting that it will initialize the database. This is to reduce confusion for folks watching the PostgreSQL error log while Sqitch runs (#314).
Sqitch v0.9999
Bug Fixes
- Fixed a test failure with the MySQL max limit value, mostly exhibited
on BSD platforms. - Removed fallback in the PostgreSQL engine on the
$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). - Changed dependency validation to prevent an error when a change required
from a different project has been reworked. Previously, when requiring a
change such asfoo:greeble
, Sqitch would raise an error iffoo: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. - Added a workaround for the shell quoting issue on Windows. Applies to
IPC::System::Simple 1.29 and lower. See
pjf/ipc-system-simple#29
for details (#413). - Fixed an issue with the MariaDB client where a deploy, revert, or verify
failure was not properly propagated to Sqitch. Sqitch now passes
--abort-source-on-error
to the Mariamysql
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). - Fixed an issue with command argument parsing so that it truly never returns
a target without an engine specified, as documented. - Removed documentation for methods that don't exist.
- Fixed test failures due to a change in Encode v2.99 that's stricter about
undef
arguments that should be defined.
Improvements
- The Snowflake engine now consults the
connections.warehousename
,
connections.dbname
, andconnections.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. - Switched to using a constant internally to optimize windows-specific code
paths at compile time. - When
deploy
detects undeployed dependencies, it now eliminates duplicates
before listing them in the error message. - Now requiring IO::Pager v0.34 or later for its more consistent interface.
- Added notes about creating databases to the tutorials. Thanks to Dave Rolsky
for the prompt (#315). - Added a status message to tell the user when the registry is being updated,
rather than just show each individual update. Thanks to Ben Hutton for the
suggestion (#276). - Added support for a
$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). - Fixed target/engine/change argument parsing so it won't automatically fail
whencore.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 notcore.engine
is set. This
change eliminates the need for theno_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). - Refactored config handling in tests to use a custom subclass of
App::Sqitch::Config instead of various mocks, temporary files, and the like. - Added advice to use the PL/pgSQL
ASSERT()
function for verify scripts to
the Postgres tutorial. Thanks to Sergii Tkachenko for the PR (#425).
Target Variables
- The
verify
command now readsdeploy.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. - Variables set via the
--set-deploy
option on therebase
andcheckout
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. - Added support for core, engine, and target variable configuration. The
simplest way to use them is via the--set
option on theinit
,engine
,
andtarget
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
, andcheckout
). The commands merge the variables from each level
in this priority order:--set-deploy
and--set-revert
options onrebase
andcheckout
--set
optiontarget.$target.variables
engine.$engine.variables
deploy.variables
,revert.variables
, andverify.variables
core.variables
Seesqitch-configuration
for general documentation of of the hierarchy for
merging variables and the documentation for each command for specifics.
Options Unification
- Added the
--chdir
/--cd
/-C
option to specify a directory to change to
before executing any Sqitch commands. Thanks to Thomas Sibley for the
suggestion (#411). - Added the
--no-pager
option to disable the pager (#414). - Changed command-line parsing to allow core and command options to appear
anywhere on the line. Previously, core options had to come before the
command name, and command options after. No more. The caveat is that command
options that take arguments should either appear after the command or use
the--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]
. - Simplified and clarified the distinction between core and command options by
removing all options from the core except those that affect output and
runtime context. The core options are:- -C --chdir --cd Change to directory before performing any actions
- --etc-path Print the path to the etc directory and exit
- --no-pager Do not pipe output into a pager
- --quiet Quiet mode with non-error output suppressed
- -V --verbose Increment verbosity
- --version Print the version number and exit
- --help Show a list of commands and exit
- --man Print the introductory documentation and exit
- Relatedly, single-letter core options will now always be uppercase, while
single-letter command options will be lowercase. As such,-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. - All other options have been moved to the commands they affect. Their use
should remain mostly unchanged now that command options are parsed from
anywhere on the command-line, although we recommend that all options come
after commands. The options were moved as follows:--registry
,--client
,--db-name
,--db-user
,--db-host
, and
--db-port
(and their aliases) have been moved to thecheckout
,
deploy
,log
,rebase
,revert
,status
,upgrade
, and
verify
commands.--plan-file
and--top-dir
(deprecated; see below) have been moved
to theadd
,bundle
,checkout
,deploy
,rebase
,revert
,
rework
,show
,status
,tag
, andverify
commands. They were
already supported by theinit
,engine
, andtarget
commands
(where--top-dir
is not deprecated).
- Because some command options conflicted with core options, a few options
have been removed altogether, including:
- The
--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. - The undocumented
--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
, andtarget
commands. - The
-d
alias for--set-deploy
in therebase
andcheckout
commands
has been changed to-e
so as not to conflict with the-d
alias for
--db-name
. - Added tests for all commands to ensure none of their options conflict with
core options. Will help prevent conflicts in the future.
Deprecations & Removals
- Deprecated the
--top-dir
option in favor of--chdir
with a warning
except when used for configuration in theinit
,engine
, andtarget
commands. - Removed the core
--deploy-dir
,--revert-dir
, and--verify-dir
options,
which have been deprecated and triggering warnings since v0.9993 (August
2015). The--dir
option to theinit
,engine
, andtarget
commands
remains the favored interface for specifying script directories. - Removed the deprecated core
--engine
option. Theinit
command still
supports it, while other commands are able to parse the engine nam...
Sqitch v0.973
- Now Require DBD::SQLite compiled with SQLite 3.7.11 or higher. It
always has, but now it throws a meaningful exception if an older
version is compiled into DBD::SQLite. Thanks to Damon Buckwalter for
the report. - When a deploy fails because of missing dependencies, the list of
missing dependencies no longer contains duplicates. Thanks to Damon
Buckwalter for the report.