Skip to content

Commit

Permalink
Merge develop for v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Aug 12, 2022
2 parents cc5f938 + 596e57d commit caaa1ef
Show file tree
Hide file tree
Showing 125 changed files with 3,051 additions and 1,279 deletions.
1 change: 1 addition & 0 deletions .github/ubuntu/all-apt-prereqs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set -e

sudo apt-get update -qq
sudo apt-get remove -qq mysql-common # https://github.com/actions/virtual-environments/issues/5067#issuecomment-1038752575
sudo env DEBIAN_FRONTEND=noninteractive apt-get install -qq \
libicu-dev gettext aspell-en software-properties-common \
curl unixodbc-dev odbcinst unixodbc \
Expand Down
18 changes: 4 additions & 14 deletions .github/ubuntu/exasol.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

set -e

version=${1:-7}
echo $version

# Download dependencies.
if [ -z "$SKIP_DEPENDS" ]; then
sudo apt-get update -qq
Expand All @@ -17,17 +14,10 @@ mkdir -p /opt/exasol

# Download and unpack Exasol ODBC Driver & EXAplus.
# https://www.exasol.com/portal/display/DOWNLOAD/
if [[ "$version" =~ ^6 ]]; then
curl -sSLO https://www.exasol.com/support/secure/attachment/111075/EXASOL_ODBC-6.2.9.tar.gz
curl -sSLO https://www.exasol.com/support/secure/attachment/111057/EXAplus-6.2.9.tar.gz
sudo tar -xzf EXASOL_ODBC-6.2.9.tar.gz -C /opt/exasol --strip-components 1
sudo tar -xzf EXAplus-6.2.9.tar.gz -C /opt/exasol --strip-components 1
else
curl -sSLO https://www.exasol.com/support/secure/attachment/175398/EXASOL_ODBC-7.1.3.tar.gz
curl -sSLO https://www.exasol.com/support/secure/attachment/175394/EXAplus-7.1.3.tar.gz
sudo tar -xzf EXASOL_ODBC-7.1.3.tar.gz -C /opt/exasol --strip-components 1
sudo tar -xzf EXAplus-7.1.3.tar.gz -C /opt/exasol --strip-components 1
fi
curl -sSLO https://www.exasol.com/support/secure/attachment/186326/EXASOL_ODBC-7.1.5.tar.gz
curl -sSLO https://www.exasol.com/support/secure/attachment/179176/EXAplus-7.1.4.tar.gz
sudo tar -xzf EXASOL_ODBC-7.1.5.tar.gz -C /opt/exasol --strip-components 1
sudo tar -xzf EXAplus-7.1.4.tar.gz -C /opt/exasol --strip-components 1

# Add to the path.
if [[ ! -z "$GITHUB_PATH" ]]; then
Expand Down
1 change: 1 addition & 0 deletions .github/ubuntu/mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ set -e
# Download dependencies.
if [ -z "$SKIP_DEPENDS" ]; then
sudo apt-get update -qq
sudo apt-get remove -qq mysql-common # https://github.com/actions/virtual-environments/issues/5067#issuecomment-1038752575
sudo env DEBIAN_FRONTEND=noninteractive apt-get install -qq mysql-client default-libmysqlclient-dev
fi
37 changes: 37 additions & 0 deletions .github/workflows/cockroach.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow tests Sqitch's Cockroach engine on all supported versions of
# Postgres. It runs for pushes and pull requests on the `main`, `develop`,
# `**cockroach**`, and `**engine**` branches.
name: 🪳 Cockroach
on:
push:
branches: [main, develop, "**engine**", "**cockroach**" ]
pull_request:
branches: [main, develop, "**engine**", "**cockroach**" ]
jobs:
Cockroach:
strategy:
matrix:
version: ['22.1', '21.2']
name: 🪳 Cockroach ${{ matrix.version }}
runs-on: ubuntu-latest
steps:
- name: Start CockroachDB
run: docker run -d -p 26257:26257 cockroachdb/cockroach:latest-v${{ matrix.version }} start-single-node --insecure
- uses: actions/checkout@v2
- name: Setup Perl
id: perl
uses: shogo82148/actions-setup-perl@v1
with: { perl-version: latest }
- name: Cache CPAN Modules
uses: actions/cache@v2
with:
path: local
key: perl-${{ steps.perl.outputs.perl-hash }}
- run: cpm install --verbose --show-build-log-on-failure --no-test --with-recommends --cpanfile dist/cpanfile
- run: cpm install --verbose --show-build-log-on-failure --no-test --with-recommends DBD::Pg
- name: prove
env:
PERL5LIB: "${{ github.workspace }}/local/lib/perl5"
LIVE_COCKROACH_REQUIRED: true
SQITCH_TEST_COCKROACH_URI: db:cockroach://root@localhost:26257/
run: prove -lvr t/cockroach.t
11 changes: 8 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# This workflow creates the services and installs the clients in order to run
# coverage tests. Each engine must be accessible for a complete coverage report.
# It runs for pushes and pull requests on the main and develop branches.
# It runs for pushes and pull requests on the `main`, `develop`, and `**cover**`
# branches.
name: 📈 Coverage
on:
push:
branches: [main, develop]
branches: [main, develop, "**cover**"]
pull_request:
branches: [main, develop]
branches: [main, develop, "**cover**"]
jobs:
Snowflake:
name: 📈 Coverage
Expand Down Expand Up @@ -43,6 +44,8 @@ jobs:
image: vertica/vertica-ce:latest
ports: [ 5433 ]
steps:
- name: Start CockroachDB
run: docker run -d -p 26257:26257 cockroachdb/cockroach:latest start-single-node --insecure
- uses: actions/checkout@v2
- name: Setup Clients
env:
Expand Down Expand Up @@ -90,6 +93,8 @@ jobs:
LIVE_SQLITE_REQUIRED: true
LIVE_VERTICA_REQUIRED: true
SQITCH_TEST_VSQL_URI: db:vertica://dbadmin@localhost:${{ job.services.vertica.ports[5433] }}/VMart?Driver=Vertica
LIVE_COCKROACH_REQUIRED: true
SQITCH_TEST_COCKROACH_URI: db:cockroach://root@localhost:26257/
run: prove -lrj4 t
- name: Report Coverage
env:
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/exasol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,18 @@ jobs:
Exasol:
strategy:
matrix:
include:
- { version: '7.1', image: 'latest-7.1', port: 8563 }
- { version: '7.0', image: 'latest-7.0', port: 8563 }
# - { version: '6.2', image: 'latest-6.2', port: 8888 }
# - { version: '6.1', image: 'latest-6.1', port: 8888 }
# - { version: '6.0', image: '6.0.16-d1', port: 8888 }
name: ☀️ Exasol ${{ matrix.version }}
exasol: ['7.1', '7.0']
name: ☀️ Exasol ${{ matrix.exasol }}
runs-on: ubuntu-latest
services:
exasol:
image: exasol/docker-db:${{ matrix.image }}
ports: [ "${{ matrix.port }}" ]
image: exasol/docker-db:latest-${{ matrix.exasol }}
ports: [ 8563 ]
options: --privileged
steps:
- uses: actions/checkout@v2
- name: Setup Clients
run: .github/ubuntu/exasol.sh ${{ matrix.version }}
run: .github/ubuntu/exasol.sh
- name: Setup Perl
id: perl
uses: shogo82148/actions-setup-perl@v1
Expand All @@ -43,5 +38,5 @@ jobs:
env:
PERL5LIB: "${{ github.workspace }}/local/lib/perl5"
LIVE_EXASOL_REQUIRED: true
SQITCH_TEST_EXASOL_URI: db:exasol://sys:exasol@127.0.0.1:${{ job.services.exasol.ports[matrix.port] }}/?Driver=Exasol;SSLCertificate=SSL_VERIFY_NONE
SQITCH_TEST_EXASOL_URI: db:exasol://sys:exasol@127.0.0.1:${{ job.services.exasol.ports[8563] }}/?Driver=Exasol;SSLCertificate=SSL_VERIFY_NONE
run: prove -lvr t/exasol.t
5 changes: 4 additions & 1 deletion .github/workflows/os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# the latest versions of Ubuntu, macOS, and Windows. Think of it as a quick
# check for working branches.
name: 💿 OS
on: [push, pull_request]
on:
push:
branches: ['*']
pull_request:
jobs:
OS:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [[🐧, ubuntu], [🍎, macos], [🪟, windows]]
perl: [ '5.34', '5.32', '5.30', '5.28', '5.26', '5.24', '5.22', '5.20', '5.18', '5.16', '5.14', '5.12' ]
perl: [ '5.36', '5.34', '5.32', '5.30', '5.28', '5.26', '5.24', '5.22', '5.20', '5.18', '5.16', '5.14', '5.12' ]
exclude:
- { os: [🪟, windows], perl: '5.12' } # https://github.com/shogo82148/actions-setup-perl/issues/876
- { os: [🪟, windows], perl: '5.14' } # https://github.com/shogo82148/actions-setup-perl/issues/881
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pg.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This workflow tests Sqitch's PostgreSQL engine on all supported versions of
# Postgres. It runs for pushes and pull requests on the `main`, `develop`,
# `**postgres**`, and `**engine**` branches.
# `**postgres**`, `**yugabyte**`, and `**engine**` branches.
name: 🐘 Postgres
on:
push:
branches: [main, develop, "**engine**", "**postgres**" ]
branches: [main, develop, "**engine**", "**postgres**", "**yugabyte**" ]
pull_request:
branches: [main, develop, "**engine**", "**postgres**" ]
branches: [main, develop, "**engine**", "**postgres**", "**yugabyte**" ]
jobs:
Postgres:
strategy:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/yugabyte.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow tests Sqitch's PostgreSQL engine on all supported versions of
# YugabyteDB. It runs for pushes and pull requests on the `main`, `develop`,
# `**postgres**`, `**yugabyte**`, and `**engine**` branches.
name: 💫 Yugabyte
on:
push:
branches: [main, develop, "**engine**", "**postgres**", "**yugabyte**" ]
pull_request:
branches: [main, develop, "**engine**", "**postgres**", "**yugabyte**" ]
jobs:
Yugabyte:
strategy:
matrix:
include:
- { version: '2.13', tag: 2.13.2.0-b135 }
- { version: '2.12', tag: 2.12.5.0-b24 }
- { version: '2.8', tag: 2.8.6.0-b12 }
- { version: '2.6', tag: 2.6.18.0-b3 }
name: 💫 Yugabyte ${{ matrix.version }}
runs-on: ubuntu-latest
steps:
- name: Setup YugabyteDB cluster
id: yugabyte
uses: yugabyte/yugabyte-db-action@master
with:
yb_image_tag: "${{ matrix.tag }}"
- uses: actions/checkout@v2
- name: Setup Perl
id: perl
uses: shogo82148/actions-setup-perl@v1
with: { perl-version: latest }
- name: Cache CPAN Modules
uses: actions/cache@v2
with:
path: local
key: perl-${{ steps.perl.outputs.perl-hash }}
- run: cpm install --verbose --show-build-log-on-failure --no-test --with-recommends --cpanfile dist/cpanfile
- run: cpm install --verbose --show-build-log-on-failure --no-test --with-recommends DBD::Pg
- name: prove
env:
PERL5LIB: "${{ github.workspace }}/local/lib/perl5"
LIVE_PG_REQUIRED: true
SQITCH_TEST_PG_URI: db:pg://yugabyte@localhost:${{ steps.yugabyte.outputs.ysql_port }}/
run: prove -lvr t/pg.t
28 changes: 28 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
Revision history for Perl extension App::Sqitch

1.3.0 2022-08-12T22:09:13Z
- 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.

1.2.1 2021-12-05T19:59:45Z
- Updated all the live engine tests, aside from Oracle, to test with
unique registry names, so as to avoid conflicts when multiple
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2012-2021 iovation, Inc., David E. Wheeler
Copyright (c) 2012-2022 iovation, Inc., David E. Wheeler

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
63 changes: 43 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
App/Sqitch version v1.2.1
App/Sqitch version v1.3.0
=========================

| Release | Coverage | Database ||
|-------------------|-------------------|-------------------|-------------------|
| [![CPAN]][📚] | [![OSes]][💿] | [![Exasol]][☀️] | [![Oracle]][🔮] |
| [![Docker]][🐳] | [![Perl]][🧅] | [![Firebird]][🔥] | [![Snowflake]][❄️] |
| [![Homebrew]][🍺] | [![Coverage]][📈] | [![MySQL]][🐬] | [![SQLite]][💡] |
| [![Debian]][🍥] | | [![Postgres]][🐘] | [![Vertica]][🔺] |

[Sqitch] is a database change management application. It currently supports
PostgreSQL 8.4+, SQLite 3.7.11+, MySQL 5.0+, Oracle 10g+, Firebird 2.0+, Vertica
6.0+, Exasol 6.0+ and Snowflake.
| Release | Coverage | Database ||
|-------------------|-------------------|-------------------|--------------------|
| [![CPAN]][📚] | [![OSes]][💿] | [![Exasol]][☀️] | [![Oracle]][🔮] |
| [![Docker]][🐳] | [![Perl]][🧅] | [![Firebird]][🔥] | [![Snowflake]][❄️] |
| [![Homebrew]][🍺] | [![Coverage]][📈] | [![MySQL]][🐬] | [![SQLite]][💡] |
| [![Debian]][🍥] | | [![Postgres]][🐘] | [![Vertica]][🔺] |
| | | [![Yugabyte]][💫] | [![Cockroach]][🪳] |

[Sqitch] is a database change management application. It currently supports:

* [PostgreSQL] 8.4+
* [YugabyteDB] 2.6+
* [CockroachDB] 21+
* [SQLite][lite] 3.7.11+
* [MySQL][my] 5.1+
* [MariaDB] 10.0+
* [Oracle][orcl] 10g+,
* [Firebird][bird] 2.0+
* [Vertica][vert] 6.0+
* [Exasol][exa] 6.0+
* [Snowflake][flake]

What makes it different from your typical migration approaches? A few things:

Expand All @@ -24,7 +35,7 @@ What makes it different from your typical migration approaches? A few things:

Changes are implemented as scripts native to your selected database engine.
Writing a [PostgreSQL] application? Write SQL scripts for [`psql`]. Writing
an [Oracle]-backed app? Write SQL scripts for [SQL\*Plus].
an [Oracle][orcl]-backed app? Write SQL scripts for [SQL\*Plus].

* Dependency resolution

Expand All @@ -34,7 +45,7 @@ What makes it different from your typical migration approaches? A few things:

* Deployment integrity

Sqitch manages changes and dependencies via a plan file, and employs a
Sqitch manages changes and dependencies via a plan file, employing a
[Merkle tree] pattern similar to [Git][gitmerkle] and [Blockchain] to ensure
deployment integrity. As such, there is no need to number your changes,
although you can if you want. Sqitch doesn't much care how you name your
Expand All @@ -44,13 +55,12 @@ What makes it different from your typical migration approaches? A few things:

Up until you [tag] and [release] your project, you can modify your change
deployment scripts as often as you like. They're not locked in just because
they've been committed to your VCS. This allows you to take an iterative
approach to developing your database schema. Or, better, you can do
test-driven database development.
they've been committed to your VCS. This allows you to take an iterative or
test-driven approach to developing your database schema.

Want to learn more? The best place to start is in the tutorials:

* [Introduction to Sqitch on PostgreSQL](lib/sqitchtutorial.pod)
* [Introduction to Sqitch on PostgreSQL, YugabyteDB, and CockroachDB](lib/sqitchtutorial.pod)
* [Introduction to Sqitch on SQLite](lib/sqitchtutorial-sqlite.pod)
* [Introduction to Sqitch on Oracle](lib/sqitchtutorial-oracle.pod)
* [Introduction to Sqitch on MySQL](lib/sqitchtutorial-mysql.pod)
Expand Down Expand Up @@ -102,7 +112,7 @@ naming the feature:
The feature names generally correspond to the supported engines. The currently
supported features are:

* `--with postgres`: Support for managing PostgreSQL databases
* `--with postgres`: Support for managing Postgres, Yugabyte, and Cockroach databases
* `--with sqlite`: Support for managing SQLite databases
* `--with mysql`: Support for managing MySQL databases
* `--with firebird`: Support for managing Firebird databases
Expand All @@ -128,7 +138,7 @@ Linux distributions and Windows, see the [Installation documentation].
License
-------

Copyright (c) 2012-2021 iovation Inc., David E. Wheeler
Copyright (c) 2012-2022 iovation Inc., David E. Wheeler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -176,13 +186,26 @@ SOFTWARE.
[🍥]: https://packages.debian.org/stable/sqitch "Latest version on Debian"
[Postgres]: https://github.com/sqitchers/sqitch/actions/workflows/pg.yml/badge.svg
[🐘]: https://github.com/sqitchers/sqitch/actions/workflows/pg.yml "Tested with PostgreSQL 9.3–14"
[Yugabyte]: https://github.com/sqitchers/sqitch/actions/workflows/yugabyte.yml/badge.svg
[💫]: https://github.com/sqitchers/sqitch/actions/workflows/yugabyte.yml "Tested with YugabyteDB 2.6–2.13"
[Vertica]: https://github.com/sqitchers/sqitch/actions/workflows/vertica.yml/badge.svg
[🔺]: https://github.com/sqitchers/sqitch/actions/workflows/vertica.yml "Tested with Vertica 7.1–11.0"
[Cockroach]: https://github.com/sqitchers/sqitch/actions/workflows/cockroach.yml/badge.svg
[🪳]: https://github.com/sqitchers/sqitch/actions/workflows/cockroach.yml "Tested with CockroachDB v21-22"

[Sqitch]: https://sqitch.org/
[PostgreSQL]: https://postgresql.org/
[YugabyteDB]: https://www.yugabyte.com/yugabytedb/
[CockroachDB]: https://www.cockroachlabs.com/product/
[lite]: https://sqlite.org/
[my]: https://dev.mysql.com/
[MariaDB]: https://mariadb.org
[`psql`]: https://www.postgresql.org/docs/current/static/app-psql.html
[Oracle]: https://www.oracle.com/database/
[orcl]: https://www.oracle.com/database/
[bird]: https://www.firebirdsql.org/
[vert]: https://www.vertica.com/
[exa]: https://www.exasol.com/
[flake]: https://www.snowflake.net/
[SQL\*Plus]: https://www.orafaq.com/wiki/SQL*Plus
[Merkle tree]: https://en.wikipedia.org/wiki/Merkle_tree "Wikipedia: “Merkle tree”"
[gitmerkle]: https://stackoverflow.com/a/18589734/
Expand Down

0 comments on commit caaa1ef

Please sign in to comment.