Releases: maragudk/migrate
v0.6.0 - Upgrade to Go 1.18
What's Changed
- Upgrade test dependencies by @markuswustenberg in #36
Full Changelog: v0.5.0...v0.6.0
v0.5.0 - Move module to maragu.dev/migrate
Please update your imports to use maragu.dev/migrate
instead of github.com/maragudk/migrate
. Steps:
go get maragu.dev/migrate
- Replace All in your project,
github.com/maragudk/migrate
->maragu.dev/migrate
go mod tidy
What's Changed
- Upgrade dependencies by @markuswustenberg in #32
⚠️ Move module to maragu.dev/migrate by @markuswustenberg in #35
Full Changelog: v0.4.3...v0.5.0
Add better error messages
Error messages are now more descriptive and upstream errors are wrapped properly.
Allow . (full stop) in table name
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
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
BREAKING: New
now only takes an Options
struct.
Add Migrator.MigrateTo and Up/Down/To convenience functions
Add Migrator.MigrateTo and To (#14) Fixes #2.
Placeholder is gone
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
v0.2.1 Add CI badge to readme (#8)
Drop the path
Migrator.Path
is gone, use fs.Sub
if you need a different directory.