migrator

package
v0.0.0-...-fca7ff4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	Port     int
	Username string
	Password string
	DBName   string
	SSLMode  string
}

type Migrate

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

func New

func New(cfg Config, path string) Migrate

func (Migrate) Down

func (m Migrate) Down(maxM int) (n int, err error)

Down migrate Will apply at most `max` migrations. Pass 0 for no limit (or use Exec).

func (Migrate) Up

func (m Migrate) Up(maxM int) (n int, err error)

Up migrate Will apply at most `max` migrations. Pass 0 for no limit (or use Exec).

Jump to

Keyboard shortcuts

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