dbump_pgx

package module
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.8.0

type Config struct {
	// Schema for the dbump version table. Default is empty which means "public" schema.
	Schema string
	// Table for the dbump version table. Default is empty which means "_dbump_log" table.
	Table string
	// contains filtered or unexported fields
}

Config for the migrator.

type Migrator

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

Migrator to migrate Postgres.

func NewMigrator

func NewMigrator(conn *pgx.Conn, cfg Config) *Migrator

NewMigrator instantiates new Migrator.

func (*Migrator) DoStep added in v0.11.0

func (pg *Migrator) DoStep(ctx context.Context, step dbump.Step) error

Version is a method from Migrator interface.

func (*Migrator) Drop added in v0.11.0

func (pg *Migrator) Drop(ctx context.Context) error

Drop is a method from Migrator interface.

func (*Migrator) Init

func (pg *Migrator) Init(ctx context.Context) error

Init is a method from Migrator interface.

func (*Migrator) LockDB

func (pg *Migrator) LockDB(ctx context.Context) error

LockDB is a method from Migrator interface.

func (*Migrator) UnlockDB

func (pg *Migrator) UnlockDB(ctx context.Context) error

UnlockDB is a method from Migrator interface.

func (*Migrator) Version

func (pg *Migrator) Version(ctx context.Context) (version int, err error)

Version is a method from Migrator interface.

Jump to

Keyboard shortcuts

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