repair

package
v1.149.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Applied  = "applied"
	Reverted = "reverted"
)

Variables

View Source
var ErrInvalidVersion = errors.New("invalid version number")

Functions

func GetMigrationFile added in v1.85.0

func GetMigrationFile(version string, fsys afero.Fs) (string, error)

func Run

func Run(ctx context.Context, config pgconn.Config, version []string, status string, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error

func UpdateMigrationTable added in v1.68.3

func UpdateMigrationTable(ctx context.Context, conn *pgx.Conn, version []string, status string, repairAll bool, fsys afero.Fs) error

Types

type MigrationFile added in v1.67.0

type MigrationFile struct {
	Lines   []string
	Version string
	Name    string
}

func NewMigrationFromFile added in v1.67.0

func NewMigrationFromFile(path string, fsys afero.Fs) (*MigrationFile, error)

func NewMigrationFromReader added in v1.67.0

func NewMigrationFromReader(sql io.Reader) (*MigrationFile, error)

func NewMigrationFromVersion added in v1.67.0

func NewMigrationFromVersion(version string, fsys afero.Fs) (*MigrationFile, error)

func (*MigrationFile) ExecBatch added in v1.67.0

func (m *MigrationFile) ExecBatch(ctx context.Context, conn *pgx.Conn) error

func (*MigrationFile) ExecBatchWithCache added in v1.67.0

func (m *MigrationFile) ExecBatchWithCache(ctx context.Context, conn *pgx.Conn) error

Jump to

Keyboard shortcuts

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