Goose Versions Save

A database migration tool. Supports SQL migrations and Go functions.

v3.13.3

10 months ago

Fixed a bunch of build issues, see https://github.com/pressly/goose/releases/tag/v3.13.4 for correct changelog.

v3.13.1

10 months ago
  • Add pre-built binaries with GoReleaser and update the build process.

v3.13.0

10 months ago

Changelog

  • Fix up and up -allowing-missing behavior.
  • Fix empty version in log output.
  • Add new context.Context-aware functions and methods, for both sql and go migrations.
  • Return error when no migration files found or dir is not a directory.

Note, tags v3.12.0, v3.12.1, v3.12.2 have been retracted because they contained the wrong module reference, please use the current release v3.13.0 onwards. Apologies for the inconvenience.

Full Changelog: https://github.com/pressly/goose/compare/v3.11.2...v3.13.0

v3.11.2

1 year ago

Changelog

Full Changelog: https://github.com/pressly/goose/compare/v3.11.0...v3.11.2

v3.11.0

1 year ago

Changelog

  • ba6e5fb6f00f4ca35fea83963dc7e6622832d3f8: Add 'sqlserver' to dialects as an alias of mssql (#510) (@ffaen)
  • 3e0905abacffc8cd736617b8ce3c8a724db7e2bb: build(deps): bump github.com/opencontainers/runc from 1.1.4 to 1.1.5 (#488) (@dependabot[bot])
  • 4eee07f48a5c72b08925bb7bd787524af48a294b: build(deps): bump github.com/ory/dockertest/v3 from 3.9.1 to 3.10.0 (#504) (@dependabot[bot])
  • 86f779a9590e4edba5d2620b7ce88dc6d30a0580: build: add Linux ARM64 arch support (#499) (@jesusprubio)
  • 0bc00342b57dd894593b5bac154776cc06943ef6: build: upgrade deps and update workflows (#500) (@mfridman)
  • 99204d2421167fe254eeb8345f1aa7e3823740ac: build: upgrade to github.com/jackc/pgx/v5 (#475) (@dahu33)
  • 15ef2bcb6e6b6f38de5519dff5e57c6480373b00: chore: fix comment typos (#480) (@deining)
  • 33106fc6f2794885be83db34feac1a17b0462e99: chore: update annotation comments (#478) (@mfridman)
  • 0d1296b2bbb3e88b4920c9441beb98bfefc23a5d: feat(mssql): update driver to microsoft/go-mssqldb (#501) (@mfridman)
  • 49c55f0f984eda9e57229f0f515bd09143cc1f17: feat: add support for azuresql dialect (#487) (@sblackstone)
  • e2ecb28d00ece625482f4f5de4397da34825ea14: fix: clickhouse tests (@mfridman)
  • c462979327385eb7bf68e5bf2e232e8fbd3f9773: refactor: create a generic store and stub out dialect queries (#477) (@mfridman)
  • baaec139e4ebc44db20ea46f133b7ddf1b9c5bb7: refactor: dialectquery (#482) (@mfridman)
  • 8574431aadfdbc2978623d7d5c859d80fdb7cbd3: refactor: remove deprecated ioutil (@mfridman)

v3.10.0

1 year ago

Changelog (for humans)

  • Bumps the minimum Go version to 1.18
  • Add a new command: goose validate .. enables you to validate your SQL / Go migrations. Very handy for catching errors in CI when the migration is first written
  • Removes hard coded tls override in MySQL DSN
  • ClickHouse down migrations (deleting version) now uses set mutations_sync 2 for synchronization

Changelog

  • 2a6d7c092fd9cb8cf18559be3914a80c9fdaba01: build: bump minimum Go version to 1.18 (update CI) (#458) (@mfridman)
  • 935e8833e84713bc96a86c61c0312b9db11b6988: build: golangci-lint add skip-pkg-cache: true (@mfridman)
  • 7e6e5120a2ea56f47f454aaa852dea09dfbb6099: build: update CI go version references and upgrade deps (#473) (@mfridman)
  • 0af59c1a4ea2736e5cb4092891b7d2ff84507da4: build: upgrade dependencies (#471) (@mfridman)
  • c2f9bcbc804e55a01ec33254c4998b03e97b6f07: ci: drop 1.17 tests and add 1.20-rc.3 (#455) (@mfridman)
  • ad906520422008360de7c76e1698f6e0a6e4a918: clickhouse: set mutations_sync 2 for delete version (#454) (@chapsuk)
  • 8c25e3bd171fd491170f79b26ab06f8980eb4988: feat: goose validate command (#449) (@mfridman)
  • b4af752f57daec3b65ea1ff471ad3c0582ed76a8: fix test race condition and remove verbose global in parser (#457) (@mfridman)
  • b62288d2fe5f8bd34d256ed899dee068d1f2f9e5: fix: exclude Go test files from migrations (#474) (@ipoerner)
  • 60610d3ae34e3e6ac840374adb20b88185eaa197: remove tls override from mysql dsn normalizing (#468) (@jonas-jonas)

v3.9.0

1 year ago

Changelog

Added

  • Add support for *sql.DB-registered Go migrations (#450). Kudos to @cbodonnell for helping with this feature.

There are 2 new func types:

// GoMigration is a Go migration func that is run within a transaction.
type GoMigration func(tx *sql.Tx) error

// GoMigrationNoTx is a Go migration func that is run outside a transaction.
type GoMigrationNoTx func(db *sql.DB) error

And 2 new functions to register Go migrations:

// AddMigrationNoTx adds Go migrations that will be run outside transaction.
func AddMigrationNoTx(up, down GoMigrationNoTx) { ... }

// AddNamedMigrationNoTx adds named Go migrations that will be run outside transaction.
func AddNamedMigrationNoTx(filename string, up, down GoMigrationNoTx) { ... }
  • Add goose env command to expose set environment variables (#443)
  • Add golangci-lint to enforce standards within the project (#456)

Fixed

  • The SQL parser better handles leading/trailing empty lines and comments (#446). Additional tests have been added to capture edge cases with the parser.

v3.8.0

1 year ago

Changelog

  • 5a6c34ee2d2b38109677107753f83f05f34161ef: Add NO_COLOR (-no-color) support (#409) (@mfridman)
  • b5826417d982a065ecbfa3d0d714ef2997a9775d: Adds vertica driver support (#393) (@bobpace)
  • b6c15b9660702680acb3f1e35201f4685ee04a68: Bump modernc.org/sqlite from 1.18.1 to 1.19.1 (#406) (@dependabot[bot])
  • 73e53f9922d88ad8ce10d95ac0dede569074bffe: Changing Sprintf to Sprint if there is no formatting (#417) (@sashamelentyev)
  • 28113a216cf544ed53f1838a678b4ec87ff6fc22: Print duration of execution time of each migration (#410) (@mfridman)
  • 1c152152a1d0599088cbd433b875257624bbd592: Remove deprecated package ioutil and upgrade deps (#411) (@mfridman)
  • f30eb6d8c52c5d8338f4d45990b2971921cb8c74: Update deprecated query in createVersionTableSQL for new ClickHouse versions since 22.7 (#408) (@Systemnick)
  • 9823e00b3f5df9b1b50ed98f17b12bcef8bd54ff: Upgrade golang.org/x/text (#421) (@brandon-leapyear)
  • 1939e6175b16e70abd19a36b25206eefcdfd6460: build: upgrade dependencies (#442) (@mfridman)
  • 436452dc94fdb8288fe64c36cbc33c8b4136d0e7: ci: bump goreleaser/goreleaser-action from 3 to 4 (#430) (@dependabot[bot])
  • 81d44b309504a6683c4c818c907ad13cbd9d18a3: refactor: Use math.MaxInt64 const as MaxVersion instead of hardcode number (#441) (@sashamelentyev)

v3.7.0

1 year ago

Changelog

  • 45a192fa308b54fe324ac8bf9868d34d577be235: Add a credit notation for Gopher image in README (#375) (@ryokotmng)
  • 4826c0313b181c339a4be3008341cc11015d18ec: Bump github.com/ClickHouse/clickhouse-go/v2 from 2.1.0 to 2.2.0 (#377) (@dependabot[bot])
  • 8abd890d06412e899314e96b23b91ed1350eeddd: Exit with error 1 without required arguments (#399) (@el4v)
  • 7792d04aae3ac1732b5ed0d49930ff1e5cc99a43: Update GH workflow to include go version 1.19.0-rc.1 (#381) (@mfridman)
  • 2278d75a8657c9f9a9661d0b8d99e8b219e1a358: Upgrade direct and indirect deps (#391) (@mfridman)
  • 0a729707373536519a3aef3d3a4d0c4d4ced5766: logger: add nop logger (#384) (@mfridman)
  • 496d7cdf15e0d08f07763466cfbeb5aeed0d328f: parser: preserve empty lines in SQL statements (#372) (@iktakahiro)
  • bc72e7863c9635de654f05f966d603a291e4955b: postgres: switch from lib/pq to jackc/pgx (#382) (@craigpastro)

v3.6.1

1 year ago

Changelog

  • bfd4286c0fda61ce69e54a272fdf90e72b301aa5: Fix example index out of range error (#368) (@slavick)
  • f3d569f61bc677350e34ae36f825ca103e526857: Remove pkg/errors in favor of std lib (#373, #328) (@oussama4)
  • 4ec294d599fb81b1f0f4cb6682587492de1188dd: clickhouse: remove hard-coded verb in dialect (#370) (@mfridman)
  • d04c088d096a40cce3e20a30b286aacc957ac9f2: e2e: move db container helpers to internal/testdb (#371) (@mfridman)