migrate

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRunner added in v1.0.1

func NewRunner(cfg RunnerCfg) *runner

NewRunner creates and configures a new runner

Types

type Project

type Project struct {
	Component  cfg.Component
	Databases  map[string]cfg.Database  // map of database machine names to databases
	Migrations map[string]cfg.Migration // map of migration machine names to migrations
	Tunnels    map[string]cfg.Tunnel    // map of tunnels
	// contains filtered or unexported fields
}

Project defines an overall project consisting of Databases and Migrations

func LoadProject

func LoadProject(filename string) (project Project, err error)

LoadProject loads a project from yaml data

type RunResult

type RunResult struct {
	MachineName       string
	SourceArgs        []string
	DestinationDriver *driver.Driver
	SourceDriver      *driver.Driver
	Started           time.Time
	Count             int
	Duration          time.Duration
}

RunResult is returned by the Run method

type RunnerCfg added in v1.0.1

type RunnerCfg struct {
	Project       Project
	DriverManager *driver.Manager
	TunnelManager tunnel.Manager
	Quiet         bool // Fast mode (no file log / sampled status)
	DryRun        bool
	Verbose       bool
	NoTime        bool   // Disable timestamps and duration for deterministic output
	Limit         int    // Limit the number of records to process
	Path          string // relative path to config
	LocalDbPath   string // output path
	Logger        *zap.Logger
}

Runner runs migrations.

Jump to

Keyboard shortcuts

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