Release 2.4.0
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.