pgmigrate

package
v19.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAllApplied added in v19.4.0

func IsAllApplied(ctx context.Context, db *sql.DB, migrationsFS fs.FS, tableName string) (bool, error)

IsAllApplied reports whether tableName exists and records every migration in migrationsFS as applied. It neither takes goose's session lock nor creates the version table, so it can poll a database that another process migrates under a different role.

Types

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

func NewMigrator

func NewMigrator(db *sql.DB, migrationsFS fs.FS, opts ...goose.ProviderOption) (*Migrator, error)

func (*Migrator) Down

func (*Migrator) DownTo

func (m *Migrator) DownTo(ctx context.Context, version int64) ([]*goose.MigrationResult, error)

func (*Migrator) HasPending

func (m *Migrator) HasPending(ctx context.Context) (bool, error)

func (*Migrator) Status

func (m *Migrator) Status(ctx context.Context) ([]*goose.MigrationStatus, error)

func (*Migrator) Up

Jump to

Keyboard shortcuts

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