Skip to content

Release 2.4.0

Compare
Choose a tag to compare
@mmatczuk mmatczuk released this 30 Apr 09:41
· 62 commits to master since this release

This release adds support for embedding migration files inside binary with go:embed.
It requires go 1.16+.

Example:

Embed all cql files in your migration directory.

//go:embed *.cql
var Files embed.FS

Pass the FS to migration function.

if err := migrate.FromFS(context.Background(), session, cql.Files); err != nil {
	// handle error
}

The migrate.Migrate function is now deprecated.