Skip to content

Releases: golang-migrate/migrate

v4.2.2

Choose a tag to compare

@dhui dhui released this 15 Jan 20:02

Changes

  • Add support for MongoDB migrations thanks to @bobrovde (#146)
  • Test improvements
    • MySQL DB driver tests should pass more consistently
  • Update gocql (Cassandra DB driver)
    • Cassandra DB driver tests should pass more consistently

v4.2.1

Choose a tag to compare

@dhui dhui released this 04 Jan 00:54

Changes

  • Fix release packaging issue

v4.2.0

Choose a tag to compare

@dhui dhui released this 03 Jan 20:05
fd50054

Breaking Changes

  • Update github.com/docker/docker checksum in go.sum which is computed differently in Go 1.11.4
    • If you're using Go modules, you'll need to use Go 1.11.4 with this version.

Changes

  • Update github.com/go-sql-driver/mysql from v1.4.0 to v1.4.1 to fix issue with connecting to a MySQL RDBMS w/o a password. Thanks to @fsouza for reporting (#139) and fixing (#141) the issue.
  • More tolerant URL parsing by file source driver thanks to @coolaj86 (#143)
  • Support NilVersion in ClickHouse db driver thanks to @bobrovde (#145)
    • To use this, you'll need to manually ALTER the version column in the schema version table. e.g. ALTER schema_migrations MODIFY COLUMN version Int64

v4.1.0

Choose a tag to compare

@dhui dhui released this 27 Nov 22:42

Breaking Changes

  • The Redshift DB driver no longer exposes an embedded database.Driver.
    The decision was made to include this backwards incompatible change since it's unlikely to affect any users. e.g. the affected usage is an anti-pattern
    For more info, see: #128 (comment)
    You will not be impacted by this change unless you're using the Redshift DB driver's embedded database.Driver e.g. redshift.Redshift.Driver
    If you encounter this issue, either:
    1. Stop using the embedded database.Driver and instead use the Redshift DB driver which provides the same interface.
    2. Wrap the new Redshift DB driver and update your references to use your new wrapper
  • Debian packages install migrate to /usr/local/bin instead of /usr/bin. You'll need to update any references to the migrate binary that uses absolute paths and ensure that /usr/local/bin is in your environment PATH.

Changes

  • Support TLS connections in the Cassandra DB driver thanks to @weszeloos (#115)
  • Allow the Spanner DB driver to be customized in Go thanks to @wmetaw (#121)
  • Support migrating multiple schemas in Postgres thanks to @vporoshok (#127)
    • Fixed issue with dangling locks in unreleased version. Thanks @PawelKawecki for reporting! (#130)
  • Fix the Redshift DB driver (not sure if it ever worked...). Thanks to @sumits for reporting and investigating (#90) and @andrei-m for fixing (#128)
  • Changed CLI path so that binaries built using the Go tool chain have the namemigrate thanks to @vearutop (#131)
  • Support Debian packages across more distros (debian/stretch, debian/buster, ubuntu/xenial [16.04 LTS], ubuntu/bionic [18.04 LTS], ubuntu/cosmic [18.10])

v4.0.2

Choose a tag to compare

@dhui dhui released this 15 Oct 22:26

Changes

  • Update dependencies

v4.0.1

Choose a tag to compare

@dhui dhui released this 15 Oct 20:54
8c3f34e

Changes

  • Fix logrus name collision in go.mod thanks to @albenik (#114)

v4.0.0

Choose a tag to compare

@dhui dhui released this 11 Oct 06:46

Breaking Changes

  • Opt-in to Go 1.11 modules
    • Per the Go module wiki, only Go 1.9.7+, 1.10.3+, and 1.11+ are supported
    • You'll need to use Go modules to use this release
      • Use modules: go mod init
      • Update to the latest version of migrate: go get -u github.com/golang-migrate/migrate
    • If you're updating from v3.5.2, you'll need to update all of your imports from v3 to v4
      • A command like this should update your imports:
        sed -i -e 's@"github.com/golang-migrate/migrate/v3@"github.com/golang-migrate/migrate/v4@g' $(git grep -l '"github.com/golang-migrate/migrate/v3')
    • If you're updating from any other version before v4 except for v3.5.2, you'll need to change your imports to include v4
      • A command like this should update your imports:
        sed -i -e 's@"github.com/golang-migrate/migrate@"github.com/golang-migrate/migrate/v4@g' $(git grep -l '"github.com/golang-migrate/migrate')
    • Note: BSD sed and GNU sed treat the -i option differently. Please consult your sed man page before running any of the commands above

v3.5.4

Choose a tag to compare

@dhui dhui released this 10 Oct 23:26

Changes

  • Fix docker build

v3.5.3

Choose a tag to compare

@dhui dhui released this 10 Oct 22:58

Breaking Changes (from v3.5.2 only)

  • Opt out of Go modules
    • Update all of your imports. e.g. github.com/golang-migrate/migrate/v3 becomes github.com/golang-migrate/migrate
    • A command like this should work:
      sed -i -e 's@"github.com/golang-migrate/migrate/v3@"github.com/golang-migrate/migrate@g' $(git grep -l '"github.com/golang-migrate/migrate/v3')
      • Note: BSD sed and GNU sed treat the -i option differently. Please consult your sed man page before running the command above.

Changes

  • Don't drop views when running migrate drop with the Postgres db driver thanks to @MikeFitzgerald (#110)

v3.5.2

Choose a tag to compare

@dhui dhui released this 14 Sep 21:34

Breaking Changes

  • Opt-in to Go 1.11 modules
    • To use this release, you'll need to:
      1. Per the Go module wiki, use Go 1.9.7+, 1.10.3+, or 1.11
      2. Update all of your imports. e.g. github.com/golang-migrate/migrate becomes github.com/golang-migrate/migrate/v3
        • A command like this should work:
          sed -i -e 's@"github.com/golang-migrate/migrate@"github.com/golang-migrate/migrate/v3@g' $(git grep -l '"github.com/golang-migrate/migrate')
          • Note: BSD sed and GNU sed treat the -i option differently. Please consult your sed man page before running the command above.
      3. Pin migrate to v3.5.2 (or later) by running: go get -u github.com/golang-migrate/migrate

Changes

  • Stop leaking *sql.DB from the mysql and postgres drivers thanks to @Kay-Zee (#98)