migrate

package
v0.0.0-...-a649508 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

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

Log is a logger.

func (*Log) Printf

func (l *Log) Printf(format string, v ...interface{})

Printf prints a formatted string into the log.

func (*Log) Verbose

func (l *Log) Verbose() bool

Verbose returns true if verbosity is enabled.

type Migrate

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

Migrate interacts with database migrations.

func New

func New(migrationFilepath string, databaseURL string) (*Migrate, error)

New creates a new database migrator.

func (Migrate) Close

func (m Migrate) Close() error

Close closes the database connection.

func (Migrate) Create

func (m Migrate) Create(name string) error

Create creates a migration.

func (Migrate) Down

func (m Migrate) Down() error

Down migrates all the way down.

func (Migrate) Force

func (m Migrate) Force(version int) error

Force sets a migration version and sets the dirty state to false.

func (Migrate) Steps

func (m Migrate) Steps(limit int) error

Steps migrates by `limit`, up if possitive and down if negative.

func (Migrate) Up

func (m Migrate) Up() error

Up migrates all the way up.

Jump to

Keyboard shortcuts

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