migrations

package
v0.0.0-...-c11a323 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoMigrate

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

func New

func New(cfg *config.PostgresConfig, migrationsDir string) (*GoMigrate, error)

func (*GoMigrate) Down

func (m *GoMigrate) Down() (applied bool, err error)

func (*GoMigrate) Up

func (m *GoMigrate) Up() (applied bool, err error)

type Migrator

type Migrator interface {
	// Up applies the migration and returns whether it was applied and any error that occurred.
	Up(applied bool, err error)
	// Down rolls back the migration and returns whether it was rolled back and any error that occurred.
	Down(applied bool, err error)
}

Migrator is an interface for database migrations.

Jump to

Keyboard shortcuts

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