migration

package module
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2020 License: MIT Imports: 9 Imported by: 5

README

migration

Build Status Go Report Card GoDoc MIT Licensed codecov Maintainability

PostgreSQL migration tool with transactions

./migration exec -url "postgres://postgres@localhost:5432/dbname?sslmode=disable" -dir ./fixtures -action up
./migration exec -url "postgres://postgres@localhost:5432/dbname?sslmode=disable" -dir ./fixtures -action down 2
./migration exec -url "postgres://postgres@localhost:5432/dbname?sslmode=disable" -dir ./fixtures -action status

Documentation

Overview

Package migration execute database migration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, source, url, migrate string) (n int, executed []string, err error)

Run parse and performs the required migration

func Status

func Status(ctx context.Context, source string, db *sqlx.DB) (int, []string, error)

Status check db status

Types

This section is empty.

Directories

Path Synopsis
cmd
Package cmd contains migration app commands
Package cmd contains migration app commands

Jump to

Keyboard shortcuts

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