Help us shape the future of Go! Take the 2026 Go Developer Survey

pgmigrate

package module
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: MIT Imports: 12 Imported by: 1

README

pgmigrate

Postgres migrations

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

func RunMigrations

func RunMigrations(
	session *sql.DB,
	migrations []Migration,
	retryAfterSeconds int,
) (completed []string, err error)

Types

type FileMigrationProvider

type FileMigrationProvider struct {
	Directory string
}

func (*FileMigrationProvider) GetMigrations

func (f *FileMigrationProvider) GetMigrations() []Migration

type InProgressMigrationsError

type InProgressMigrationsError struct {
	Ids                []string
	SecondsSinceLatest float64
}

func (InProgressMigrationsError) Error

type Migration

type Migration struct {
	Id         string
	Statements []string
}

type MigrationProvider

type MigrationProvider interface {
	GetMigrations() []Migration
}

Directories

Path Synopsis
cmd
pgmigrate command

Jump to

Keyboard shortcuts

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