This repository contains a migrator package written in go which helps run and manage database migrations. State of
migrations is saving in
the AWS DynamoDB
. In src/examples
you have working example for entire concept. In shortcut, you have to write a set of migration
definitions:
type Definition struct {
Name string
Func func () error
}
Pass them to Run
function as argument. Next, this function iterates through your all definitions set and execute your
code for every, single definition. Information about all previous migration are saved in a DynamoDB database. When you
try to run the migration again, only new definitions will be fired.