Skip to content

Releases: maragudk/migrate

v0.6.0 - Upgrade to Go 1.18

Choose a tag to compare

@markuswustenberg markuswustenberg released this 10 Sep 09:59
0f96189

What's Changed

Full Changelog: v0.5.0...v0.6.0

v0.5.0 - Move module to maragu.dev/migrate

Choose a tag to compare

@markuswustenberg markuswustenberg released this 10 Sep 09:30

Please update your imports to use maragu.dev/migrate instead of github.com/maragudk/migrate. Steps:

  1. go get maragu.dev/migrate
  2. Replace All in your project, github.com/maragudk/migrate -> maragu.dev/migrate
  3. go mod tidy

What's Changed

Full Changelog: v0.4.3...v0.5.0

Add better error messages

Pre-release

Choose a tag to compare

@markuswustenberg markuswustenberg released this 20 Oct 11:25
4f7ed24

Error messages are now more descriptive and upstream errors are wrapped properly.

Allow . (full stop) in table name

Pre-release

Choose a tag to compare

@markuswustenberg markuswustenberg released this 28 Mar 07:59
b86d7a9

This is a minor release, which adds a feature to allow . (full stop) characters in the migration table name (see issue #23). Thanks to @mirkoperillo for suggesting and implementing it!

Add before/after callbacks

Pre-release

Choose a tag to compare

@markuswustenberg markuswustenberg released this 18 Nov 14:14

This release adds optional functions in the migrate.Options that, if set, are called before and after each migration. The functions are passed the context, the transaction, and the version string. If the callback errors, the current migration is aborted and the transaction rolled back.

Also fixed an internal bug that didn't report errors back if a panic occurred inside a transaction.

New uses Options struct

Pre-release

Choose a tag to compare

@markuswustenberg markuswustenberg released this 05 Jul 12:53
275bddd

BREAKING: New now only takes an Options struct.

Add Migrator.MigrateTo and Up/Down/To convenience functions

Choose a tag to compare

@markuswustenberg markuswustenberg released this 25 Jun 21:02
b077d49
Add Migrator.MigrateTo and To (#14)

Fixes #2.

Placeholder is gone

Placeholder is gone Pre-release
Pre-release

Choose a tag to compare

@markuswustenberg markuswustenberg released this 17 Jun 19:41
8282b29

Breaking: Migrator.Placeholder is gone again, because it wasn't needed after all. This simplifies the API.

If you used the library in the brief time it existed, just delete its usage, and you should be good to go.

Add MySQL/MariaDB support

Pre-release

Choose a tag to compare

@markuswustenberg markuswustenberg released this 17 Jun 09:30
85e2dc9
v0.2.1

Add CI badge to readme (#8)

Drop the path

Drop the path Pre-release
Pre-release

Choose a tag to compare

@markuswustenberg markuswustenberg released this 16 Jun 17:33

Migrator.Path is gone, use fs.Sub if you need a different directory.