migrate

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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
}

RunResult is returned by the Run method

type Runner

type Runner struct {
	Project       Project
	DriverManager *driver.Manager
	TunnelManager tunnel.Manager
	DryRun        bool
	Verbose       bool
	Path          string // relative path to config
	// contains filtered or unexported fields
}

Runner runs migrations.

func (*Runner) Run

func (r *Runner) Run(machineName string, sourceArgs []string) (*RunResult, error)

Run runs a migration

Jump to

Keyboard shortcuts

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