src

package
v0.0.0-...-0e309cb Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConnectionString string
View Source
var Database *sql.DB

Functions

func Add

func Add(name string) (bool, error)

func Connect

func Connect() *sql.DB

func Down

func Down() (bool, error)

func Initialise

func Initialise() (bool, error)

func Remove

func Remove(name string) (bool, error)

func SetConfig

func SetConfig()

func SetMigrationPath

func SetMigrationPath()

func SetSQLPath

func SetSQLPath()

func SetWorkingPath

func SetWorkingPath()

func Up

func Up() (bool, error)

Types

type DriftConfig

type DriftConfig struct {
	Provider     DriftProvider `json:"provider"`
	DatabaseName string        `json:"databaseName"`
	Host         string        `json:"host"`
	Username     string        `json:"username"`
	Password     string        `json:"password"`
	Port         int           `json:"port"`
}
var Config DriftConfig

type DriftMigration

type DriftMigration struct {
	Name     string
	Checksum []byte
	Applied  time.Time
}

type DriftProvider

type DriftProvider string
const (
	POSTGRES  DriftProvider = "POSTGRES"
	SQLSERVER DriftProvider = "SQL_SERVER"
	MYSQL     DriftProvider = "MY_SQL"
)

Jump to

Keyboard shortcuts

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