migrate

package
v0.0.0-...-f677793 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

You can use the "packr clean" command to clean up this, and any other packr generated files.

Index

Constants

View Source
const PackrChangLogBox = "changeLogs"

Variables

This section is empty.

Functions

func CheckIfError

func CheckIfError(err error, message string) bool

func CloneRepo

func CloneRepo(repoName string, changelogDir string, gitServerAddr string)

func CommitChangeLogs

func CommitChangeLogs(changelogDir string)

func DoMigrate

func DoMigrate(migrateServerAddr string, m Migrate, programName ...string)

func DoMigrateWithServer

func DoMigrateWithServer(serverAddr string, migrate Migrate)

func ExtractChangeLogs

func ExtractChangeLogs(changelogDir string)

func Init

func Init(path ...string) *packr.Box

package the database sql migrate files use the first parameter as the changelog path that relative to the main entry if ignore parameter the path will be set to ../db as default

Types

type DataSource

type DataSource struct {
	DbType     DbType `json:"dbType"`
	Host       string `json:"host"`
	Port       int    `json:"port"`
	Database   string `json:"database"`
	Parameters string `json:"parameters"`
	Username   string `json:"username"`
	Password   string `json:"password"`
}

type DbType

type DbType string

type Migrate

type Migrate struct {
	Contexts   string     `json:"contexts"`
	DataSource DataSource `json:"dataSource"`
	Changelog  string     `json:"changeLog"`
}

Jump to

Keyboard shortcuts

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