Skip to content

Laterality/hysteresis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.