migrators

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package migrators provides migration helpers for sqlflow databases. Each helper returns a sqlflow.Option[Q] that can be passed to any sqlflow constructor (OpenDB, TestDB, or via WithDBFactory for pools).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Goose

func Goose(fsys fs.FS) sqlflow.Option

Goose returns an Option that runs goose migrations from fsys when the database is opened. The migration runs on the live write connection so it works correctly for both plain and SQLCipher-encrypted databases.

fsys must contain the *.sql migration files at its root (no subdirectory). Use embed.FS with fs.Sub or os.DirFS to obtain a suitable fs.FS.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL