Update to 0.9995
- Taught the `add` command not to ignore the `--change` option.
- The `add` command now emits a usage statement when no change name is
passed to it.
- The `add` command now helpfully suggests using the --change option when
attempting to add a change with the same name as a target. Thanks to
Ivan Nunes for the report!
- The `tag` command now helpfully suggests using the --tag option when
attempting to add a tag with the same name as a target.
- Added `--global` as an alias for `--user` to the `config` command. This
alias benefits the muscle memory of Git users.
- Added a note for Git users to the `sqitch-revert` documentation, to
head off potential confusion with `git revert`. Thanks to Eric
Br矇chemier for the "time travel" analogy and wording.
- Fixed an "uninitialized value" error when creating a registry \
on Windows. Thanks to Steven C. Buttgereit for the report (Issue #289).
- Fixed editor selection to prioritize the `core.editor` configuration
variable over the `$EDITOR` environment variable. The `$SQITCH_EDITOR`
environment variable still trumps all. Thanks to Jim Nasby for the pull
- Added detection of the `$VISUAL` environment variable to Editor
selection, prioritzed after the `core.editor` configuration variable
and before the `$EDITOR` environment variable. Thanks to Jim Nasby for
the pull request (#296).
- Updated the DateTime code to set the locale via `set_locale()` instead
of `set()`, as the latter may actually change the local time
unintentionally, and has been deprecated since DateTime v1.04. Thanks
to Dave Rolsky for the pull request (#304).
- Reduced minimum required MySQL engine from 5.1.0 to 5.0.0. Thanks to
@dgc-wh for testing it (Issue #251).
- Fixed floating-point rounding issue with SQLite registry versions on
Perls with 16-byte doubles. Thanks to H. Merijn Brand for the report
- Fixed an error when adding an engine with the `engine` command. Thanks
to Victor Mours for the report and fix!
- Updated the Oracle engine to support Oracle Wallet connection strings,
where no username or host is in the connection URI. Thanks to Timothy
Procter for the patch!
- Improved the installer's selection of the prefix in which to install
`etc` files to better match the `--installdirs` option, which defaults
to the "site" directories. Thanks to @carragom for the pull request
- Added missing dash to `-engine` in sample calls to `sqitch init` in the
tutorials. Thanks to Andrew Dunstan for the spot (Issue #268).
- Fixed broken Vertica documentation links.
- Attempting to revert a database with no associated registry no longer
reports the registry as version 0, but correctly reports that no
registry can be found. Thanks to Arnaldo Piccinelli for the spot (Issue
- Fixed the search for change IDs in engines to match the search for
changes. Specifically, change ID seaerch now properly handles the
offset characters `~` and `^`. This bug mainly affected the `verify`
command, but it's good to address the inconsistency, done mainly by
adding the `find_change_id` and `change_id_offset_from_id` methods to
complement the `find_change` and `change_offset_from_id` methods.
Thanks to Andrew Dunstan for the spot (Issue #272).
- Fixed the `flips` table example in the MySQL tutorial. It was
inappropriately copied from the PostgreSQL tutorial at some point.
Thanks to Jeff Carpenter for the spot (Issue #254)!
- Eliminated test failures due to warnings from DateTime::Locale when
`LC_TIME` is set to C.UTF-8. Thanks to Shantanu Bhadoria for the report
and Dave Rolsky for the workaround.
- Fixed an error checking the registry version when the local uses a
comma for decimal values. Thanks to Steffen M羹ller for the report
- Worked around an error setting the MySQL storage engine using versions
of DBI prior to 1.631. Thanks to melon-babak for the report!
- Fixed an error from the Oracle engine when deploying more than 1000
changes. Thanks to Timothy Procter and Minh Hoang for the report and
testing the fix.
- Fixed a bunch of typos in error messages, comments, and documentation.
Thanks to Dmitriy for the pull request!
- Fixed test failures due to new warnings from File::Path on Perl
- On Firebird, Looking up a change and tag in the database (via the
`--onto` option to `rebase` or the `--to` option to `revert`, among
others) would sometimes return the incorrect change if the change has
been reworked two or more times. Was fixed for the other engines in
- Fixed the `--all` option used to apply a command to all known targets
so that it loads only targets specified by the local configuration.
Otherwise, user and system configuration can get in the way when they
specify engines and targets not used by the current project.
- Added support for the `--set` option when deploying to MySQL. Thanks to
Chris Bandy for figuring out how to do it!
- Added support for a "reworked directory". By default, reworked \
scripts live in the deploy, revert, and verify directories along with
all the other change scripts. But if that starts to get too messy, or
you simply don't want to see them, add a `reworked_dir` setting to the
core, engine, or target config and reworked scripts will be stored
there, instead. Also supported are `reworked_deploy_dir`,
`reworked_revert_dir`, and `reworked_verify_dir`.
- Added the `--dir` option to the `init`, `engine`, and `target`
- Copied the core configuration options (`--engine`, `--target`,
`--plan-file`, `--registry`, etc.) to the `init`, `engine`, and
`target` commands. This means that they can be specified after the
command, which is a bit more natural. It also means that the
`--registry` and `--client` options of the `target` are no longer
- The `init` command on longer writes out commented values for the
`deploy_dir`, `revert_dir`, or `verify_dir` settings. I think these
settings are not commonly used, and it would start to get crowded if we
also added their "reworked" variants, which will be used still less.
- Added the `alter` action to the `engine` and `target` commands to set
engine and target properties.
- Added support for setting reworked directories to the `engine` and
- Reformatted the output of the `engine` and `target` command `show`
actions to include reworked directories, and to bit a bit less flat.
- Attempting to add or alter an engine with a target URI that connects to
a different engine now triggers an error. For example, you can't set
the target for engine `pg` to `db:sqlite:`.
- The `add` and `alter` actions of the `engine` and `target` commands
now create script directories if they don't already exist.
- The `add` action of the `engine` and `target` commands now creates a
plan file if one does not exist in the specified location for the
engine or target.
- Added the `deploy_dir`, `revert_dir`, and `verify_dir` methods to
App::Sqitch::Plan::Change. Each points to the proper directory for the
target depending on whether or not the change has been reworked.
- In the MySQL engine, the following URI query params will be converted
to options passed to the command-line client, if they're present:
* mysql_compression=1 => --compress
* mysql_ssl=1 => --ssl
* mysql_connect_timeout => --connect_timeout
* mysql_init_command => --init-command
* mysql_socket => --socket
* mysql_ssl_client_key => --ssl-key
* mysql_ssl_client_cert => --ssl-cert
* mysql_ssl_ca_file => --ssl-ca
* mysql_ssl_ca_path => --ssl-capath
* mysql_ssl_cipher => --ssl-cipher
- Added the "Overworked" section to sqitch-configuration guide with an
example of how to move reworked change scripts into a `reworked_dir`.
- Deprecated the `set-*` actions in the `engine` and `target` commands in
favor of the new `alter` action.
- The core `--deployed-dir`, `--revert-dir`, and `--verify-dir` options
are deprecated in favor of the `--dir` option on the `init`, `engine`,
and `target` command.
- On PostgreSQL, Sqitch now sets the `client_encoding` parameter to
`UTF8` for its own connection to the database. This ensures that data
sent to and from the databse should always be properly encoded and
decoded. Users should still set the proper encodings for change scripts
- Fixed test failures due to path differences on Windows.
- DateTime::TimeZone is now explicitly required in an attempt to head off
"Cannot determine local time zone" errors.
- Corrected some typos and thinkos in `sqitchtutorial-oracle`, thanks to
- Improved the script to upgrade an Oracle registry to v1.0 to support
versions prior to Oracle 12, thanks to Timothy Procter.
- Added missing closing parenthesis to the "Nothing to deploy" \
Thanks to George Hartzell for the pull request (Issue #226).
- Replaced the unique constraint on the `script_hash` column in the
`changes` registry table with a unique constraint on `project` and
`script_hash`. This is to allow a deploy script to be used in more than
one project in a single database. This change increments the registry
version to v1.1. Thanks to Timothy Procter for the report.
- Updated the registry check constraints to have consistent names on the
engines that support them. This will make it easier to modify the
constraints in the future.
- Fixed precision issues with the registry version on MySQL and Firebird.
- Added comment to sqitch-passwords guide that MySQL::Config is required
to read passwords from the MySQL configuration files. Thanks to
Sterling Hanenkamp for the patch!
- Reduced minimum required MySQL engine from 5.6.4 to 5.1.0. Versions
prior to 5.6.4 lose the following features:
* Versions earlier than 5.6.4 is fractional second precision on
registry `DATETIME` columns. Since the ordering of those timestamps
is so important to the functioning of Sqitch, it will sleep in 100 ms
increments between logging changes to the registry until the time has
ticked over to the next second. Naturally, reverts and deploys will
be a little slower on versions of MySQL before 5.6.4, but accurate.
* Versions earlier than 5.5.0 lose the `checkit()` functions, which
would otherwise be used to emulate CHECK constraints in the registry,
as well as in user-created verify scripts, as recommended in the
MySQL tutorial, `sqitchtutorial-mysql`.
- Added a script to update the `DATETIME` columns in a MySQL Sqitch
registry that was upgraded to MySQL 5.6.4 or higher. It will be
installed as `tools/upgrade-registry-to-mysql-5.6.4.sql` in the
directory returned by `sqitch --etc`.
- Added a script to add the `checkit()` function and registry triggers to
emulate CHECK constraints to a MySQL Sqitch registry that was upgraded
to MySQL 5.5.0 or higher. It will be installed as
`tools/upgrade-registry-to-mysql-5.5.0.sql` in the directory returned
by `sqitch --etc`.
- The `init` command now throws an error when the plan file already
exists and is invalid or defined for a different project. Thanks to
Gabriel Potk獺ny for the suggestion (Issue #214).
- All commands that take target arguments can now specify them as engine
names or plan file paths as well as target names and URIs.
- Added the `--all` option and the `$command.all` configuration variable
to the `add`, `rework`, `tag`, and `bundle` commands. This option tells
the commands to do their thing for all plans known from the
configuration, not just the default plan.
- Pass engine, target, or plan file names to the `add`, `rework`, `tag`,
and `bundle` commands` commands to specify specify one or more targets,
engines, and plans to act on.
- Added the `--change` option to the `add`, `rework`, and `tag` commands
to distinguish the change to be added, reworked, or tagged from
plan-specifying arguments, if necessary.
- Added the `--tag` option to the `tag` command to distinguish the tag to
be added from plan-specifying arguments, if necessary.
- Changed the short variant of the `--conflicts` option to the `add` and
`rework` commands from `-c` to `-x`. The `-c` option is now used as the
short variant for `--change` (and `--conflicts` has almost certainly
never been used, anyway).
- Added the `engine` and `project` variables to the execution of script
templates by the `add` command. The default templates now use it to
make their first lines one of:
* -- Deploy [% project %]:[% change %] to [% engine]
* -- Revert [% project %]:[% change %] from [% engine]
* -- Verify [% project %]:[% change %] on [% engine]
- DateTime::TimeZone::Local::Win32 is now required on Windows.
- The MySQL engine no longer passes `--skip-pager` on Windows, since
it is not supported there. Thanks to Gabriel Potk獺ny for the report
- Fixed "no such table: changes" error when upgrading the SQLite
- Fixed upgrade failure on PostgreSQL 8.4. Thanks to Phillip Smith for
- Fixed an error when the `status` command `show_changes` and `show_tags`
configuration variables were set. Thanks to Adrian Klaver for the
report (Issue #219).
- Fixed `log` and `plan` usage statements to properly spell `--abbrev`.
Thanks to Adrian Klaver for the report (Issue #220).
- Fixed the formatting of change notes so that a space precedes the `#`
character whether the note was added by the `--note` option or via an
- Fixed a bug when parsing plan files with DOS/Windows line endings.
Thanks to Timothy Procter for the report (Issue #212).
- Looking up a change and tag in the database (via the `--onto` option to
`rebase` or the `--to` option to `revert`, among others) would
sometimes return the incorrect change if the change has been reworked
two or more times. Thanks to BryLo for the report!
- Updated docs to be consistent in referring to the location of the system
configuration and template location as `$(prefix)/etc/sqitch`. Also
added notes pointing to the `--etc-dir` to find out exactly what that
resolves to. Suggested by Joseph Anthony Pasquale Holsten (Issue #167).
- Reverted deprecation of the database connection options. Target URIs
are still generally preferred, but sometimes you want to use a target
but just change the user name or database name. Retaining the options
is the easiest way to do this. Plus, a fair number of people have
scripts that use these options, and it seems petty to break them. Sorry
for the double-take here! The list of un-deprecated options is:
- Improved MySQL missing table error detection by relying on error codes
instead of matching a (possibly localized) error string.
- Made the registry upgrade more transparent when deploying. Sqitch is
now is a little more vigilent in checking for things being out-of-date
and updating them.
- Fixed an issue where the `status` command would return an error when
run against a an older version of the registry.
- Fixed a Postgres test failure when DBD::Pg is installed but psql is not
in the path.
- Now require Config::GitLike 1.15 to build on Windows in order to avoid
test failures when Cwd::abs_path dies on non-existant paths.
- Clarified the behavior of each `deploy` reversion mode with regard to
deploy script vs. verify script failures, and with the expectation that
deploy scripts are atomic.
- Target passwords can now be set via a single environment variable,
`$SQITCH_PASSWORD`. Its value will override URI-specified password.
- Added the sqitch-passwords and sqitch-environment guides.
- Fixed a bug in `sqitch engine update-config` where it would add data to
config files that did not previously have them, or report that data was
present in nonexistent config files.
- Added the `releases` table to the databases. This table will keep track
of releases of the Sqitch registry schema.
- The Oracle `registry` variable is now always `DEFINE`d when Oracle
- Added the `upgrade` command, which upgrades the schema for the Sqitch
registry for a target database.
- Added the `script_hash` column to the `changes` registry table. This
column contains a SHA-1 hash of the deploy script for the change at the
time it was deployed. For existing registries, the upgrade script sets
its value to be the same as the change ID. This value is update the
next time a project is deployed to the database.
- The error message when `deploy` cannot find the currently-deployed
change ID in the plan now includes more contextual information,
including the change name, associated tags, and the plan file name.
Suggested by Curtis Poe (Issue #205).
- Comments on Firebird registry objects are now created with the
`COMMENT` command, rather than INSERTs into catalog tables.
- Added support for "merge" events, though none are logged, yet.
Update to 0.997. From the changelog:
- Added support for new target properties. In addition to the existing
`uri`, `client`, and `registry` properties, targets may also configure
these properties via the new `--set` option to and `set-*` actions on
the `target` command:
- Added support for new engine configuration variables. In addition to
the existing `target`, `client`, and `registry` variables, engine
configuration may also include these variables:
- Rationalized the hierarchical configuration of deployment targets. The
properties of any given target will now be determined by examining
values in the following order:
* Command-line options
* Target configuration
* Engine configuration
* Core configuration
* Reasonable engine-specific defaults
- Added the `engine` command to simplify engine configuration. This
complements the newly-improved `target` command. Run `sqitch engine
update-config` to update deprecated engine configurations and start
- Added the sqitch-configuration guide to provide an overview of core,
engine, and target configuration. Includes some use-case examples and
best suggested practices.
- Simplified the output of `sqitch help`, and added the more important
options to it.
- Added the `--guide` option to `sqitch help` to list Sqitch guides.
- Renamed the `--db-client` option to `--client`. `--db-client` still
works, but is deprecated.
- Added the `--registry` core option for parity with `--client`,
`--top-dir`, `--plan-file`, and the rest of the hierarchical
- Updated the `init` documentation to better cover all the options
- Incremented the version plan file format version to v1.0.0. No changes;
it has been stable for at least a year, so it's time.
- At runtime, the Vertica engine now properly requires DBD::ODBC
instead of DBD::Pg.
- The Vertica engine now supports Vertica 6, as documented.
- Fixed a warning from Type::Utils, thanks to a report from GÃ©raud
- The `status` command once again notices if the specified database is
uninitialized and says as much, rather than dying with an SQL error.
- The `--etc-path` option works again.
- Deprecated `core.$engine` configuration in favor of `engine.$engine`. A
warning will be emitted if Sqitch sees the former. Run `sqitch engine
update-config` to update your configurations. Existing `core.$engine`
configurations will be left in place for compatibility with older
versions of Sqitch, but the `sqitch engine` command will not modify
them, so they can get out-of-sync. Run `sqitch config --remove-section
core.$engine` to remove them.
- Formally deprecated the database connection options in favor of target
URIs. If any of these options is used, a warning will be issued. They
will be dropped in v1.0:
- Formally deprecated the database connection configuration variables in
favor of target URIs. If any of these variables is used, a warning will
be issued. Run `sqitch engine update-config` to update your
configurations. Existing `core.$engine` configurations will be left in
place for compatibility with older versions of Sqitch, but the `sqitch
engine` command will not modify them, so they can get out-of-sync. Run
`sqitch config --remove-section core.$engine` to remove them. Sqitch
will cease to support them in v1.0:
- Deprecated the `--registry` and `--client` options of the `target`
command. All target properties should now be set via the new `--set`
option, such as `--set registry=reg`.
- Formally deprecated the following options of the `add` command. They
have been replaced with the `--with`, `--without`, and `--use` options
since v0.991. Their use will emit a warning, and they will be removed
- Dropped support for the long-deprecated (and likely never used outside
ancient tests long deleted) engine configuration variables
`core.sqlite.sqitch_db` and `core.pg.sqitch_schema`. Both have been
replaced with `engine.$engine.registry`, which applies to all engines.
- Formally deprecated the `@FIRST` and `@LAST` symbolic tags. Their use
will trigger a warning to use `@ROOT` and `@HEAD`, instead. They will
be removed in v1.0.
- Moved target and engine configuration from App::Sqitch and
App::Sqitch::Engine to a new class, App::Sqitch::Target. This class is
solely responsible for finding the appropriate values for attributes on
every run. The target knows what plan and engine to use, based on those
properties. App::Sqitch is now responsible solely for encapsulating
command-line options, configuration, and utilities. Classes are now
responsible for instantiating both an App::Sqitch and
App::Sqitch::Target options as appropriate.
- Updated all classes to create both Sqitch and Target objects as
appropriate. This change touched almost every class.
- Replaced attributes in App::Sqitch that were previously set from
command-line options or configuration with a single attribute,
`options`, which is a hash only of the command-line options. Classes
are now responsible for finding the proper values in config or options.
Mostly this requirement is encapsulated by the new App::Sqitch::Target
- Updated the command classes to use either a "default target" derived
from command-line options, engine configuration, and core
configuration, or a target looked up by name in the configuration
maintained by the `target` command.
- Fixed one more test failure due to the introduction of "Negative repeat
count does nothing" warning in Perl 5.21.1.
- Fixed "Redundant argument in printf" warning on Perl 5.21.2.
- Switched from Digest::SHA1, which is deprecated, to Digest::SHA for
generating SHA-1 IDs.
- Switched from Mouse and Moose to Moo. Sqitch no longer depends on any
modules that use Moose, either. This results in an approximately 40%
startup time speedup.
- Loading of App::Sqitch::DateTime is now deferred until it's needed.
This is because DateTime is rather expensive to load. Since a number of
commands don't need it, it seems silly to load it in those cases.
- Now recommend Type::Tiny::XS and Class::XSAccessor for improved
- The `check` command now properly fails on a plan parse error, instead
of blindly continuing on.
- Fixed a failing test on PosrgreSQL due to localization issues. Thanks
to Sven Schoberf for the report (Issue #171).
- Added the `revert.prompt_accept`, `rebase.prompt_accept`, and
`checkout.prompt_accept` boolean configuration variables. Set these
variables to false to change the default answer to the revert prompt to
"No". When rebasing or checking out, if the variables specific to those
commands are not set, Sqitch will fall back on the value of
`revert.prompt_accept`. Suggested by Graeme Lawton (Issue #164).
- The MySQL engine now sets the `$MYSQL_PWD` environment variable if a
password is provided in a target. This should simplify authtentication
when running MySQL change scripts through the `mysql` client client
- The MySQL engine now reads `client` and `mysql` groups in the MySQL
configuration files for a password when connecting to the registry
database, and when the target URI includes no password. The MySQL
client already read those files, of course, but now the internal
database connection does as well (Issue #150).
- The Firebird engine now sets the `$ISC_PASSWORD` environment variable
if a password is provided in a target. This should simplify
authtentication when running Firebird change scripts through the `isql`
client client. Patch from Ștefan Suciu.
- No longer passing URI query params as DBI params, because they are
already included in the DSN provided by URI::db.
- Added the Vertica engine.