hysteresis

command module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: MIT Imports: 15 Imported by: 0

README

Hysteresis - DB migration tool using flyway

Hysteresis is DB migration tool based on flyway internally.

Prerequisites

Tool uses container-wrapped flyway. So there is no need to download such as JDK or flyway jar.

You only need running docker daemon to use this tool.

Usage

# Show migration information
./hyst info

# Perform migration
./hyst migrate

Configuration

The tool just mounts flyway configuration file on ./conf/${profile}.conf into flyway container.

Also mounts .sql files on ./sql directory.

So, structure of working directory will look like following:

./
|- hyst # built binary
|- conf
|  |- local.conf # Connection information for local database
|  `- dev.conf   # Connection information for some other environment database
`- sql
   |- V1__Initial_tables.sql
   `- V2__Add_some_index.sql

The profile is local by default. So if you want to perform migration on you local DB, just run:

./hyst migrate

When if you perform migration with develop configuration:

./hyst -p develop migrate

Then, Command above uses ./conf/develop.conf file for running flyway.

Build

make build-linux # Builds linux binary
make build-mac   # Builds mac os binary

Then you can run binary named hyst.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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