migrations

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package migrations applies embedded SQL schema migrations.

Index

Constants

View Source
const (
	// DriverSQLite applies migrations from migrations/sqlite.
	DriverSQLite = "sqlite"
	// DriverPostgres applies migrations from migrations/postgres.
	DriverPostgres = "postgres"
)

Variables

This section is empty.

Functions

func Apply

func Apply(ctx context.Context, db *sql.DB, driver string) error

Apply runs all embedded migrations for the selected driver in lexicographic order. Each migration is applied exactly once and tracked in schema_migrations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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