migrate

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateMigrationFilesOptions

type CreateMigrationFilesOptions struct {
	Name    string
	UpSQL   string
	DownSQL string
}

type Migrate

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

func NewMigrate

func NewMigrate(opts Options) (*Migrate, error)

func (*Migrate) Close

func (m *Migrate) Close() error

func (*Migrate) CreateMigrationFiles

func (m *Migrate) CreateMigrationFiles(opts CreateMigrationFilesOptions) error

func (*Migrate) Down

func (m *Migrate) Down() error

func (*Migrate) DownSteps

func (m *Migrate) DownSteps(steps int) error

func (*Migrate) Status

func (m *Migrate) Status() (*StatusResponse, error)

func (*Migrate) Up

func (m *Migrate) Up() error

func (*Migrate) UpSteps

func (m *Migrate) UpSteps(steps int) error

type Options

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

type StatusResponse

type StatusResponse struct {
	CurrentVersion     uint   `json:"current_version"`
	CurrentVersionFile string `json:"current_version_file"`
	LatestVersion      uint   `json:"latest_version"`
	Dirty              bool   `json:"dity"`
	Pending            bool   `json:"pending"`
}

Jump to

Keyboard shortcuts

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