migrations

package
v0.0.0-...-f2259ff Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package migrations provides a lightweight migration runner for the Mote database. It applies SQL files embedded in the migrations directory in lexicographic order, tracking applied migrations in a _migrations table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Applied

func Applied(ctx context.Context, pool *pgxpool.Pool) (map[string]bool, error)

Applied returns the set of migration names already applied.

func ApplyAll

func ApplyAll(ctx context.Context, pool *pgxpool.Pool) ([]string, error)

ApplyAll applies all pending migrations in order.

func EnsureMigrationsTable

func EnsureMigrationsTable(ctx context.Context, pool *pgxpool.Pool) error

EnsureMigrationsTable creates the _migrations tracking table if it does not already exist.

func Pending

func Pending(ctx context.Context, pool *pgxpool.Pool) ([]string, error)

Pending returns the names of migrations not yet applied, in order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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