pgmigrate

package module
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 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

Jump to

Keyboard shortcuts

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