miglite v0.8.0 lets Go developers embed SQL migrations directly in binaries

The miglite database migration library for Go has reached v0.8.0 after four releases and 69 commits since version 0.4.0 was covered in June. The headline addition is support for embedding SQL migration files inside the compiled binary using Go's embed.FS, eliminating the need to ship a separate migrations directory alongside deployments. A new --db flag introduced in v0.5.0 allows developers to override the database name at the command line without modifying config files, making it easier to run migrations against alternate databases temporarily. Version v0.5.0 also improved the exec command to wrap multiple SQL statements in a single transaction, so a mid-run failure no longer leaves the database in a partially applied state. The command set and upgrade scripts remain unchanged, meaning existing users can upgrade without modifications.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in