migrate

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migration

type Migration struct {
	CTX context.Context
	DB  *db.DB
}

Migration executes a migration

func New

func New(driver string, connection string) (*Migration, error)

New creates a new Migration struct

func (*Migration) CloseDB

func (mig *Migration) CloseDB() error

CloseDB shuts the DB connection

func (*Migration) Execute

func (mig *Migration) Execute(sql string, dir string) error

Execute runs migrations in a provided direction

Jump to

Keyboard shortcuts

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