journey

command module
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2017 License: MIT Imports: 9 Imported by: 0

README

Journey

Build Status GoDoc

Journey is based on the work of @mattes on his tool "migrate": https://github.com/mattes/migrate/

Features

  • Super easy to implement Driver interface.
  • Gracefully quit running migrations on ^C.
  • No magic search paths routines, no hard-coded config files.
  • CLI is build on top of the migrate package.

Available Drivers

Need another driver? Just implement the Driver interface and open a PR.

Usage from Terminal

# install
go get github.com/db-journey/journey

# create new migration file in path
journey --url driver://url --path ./migrations migrate create migration_file_xyz

# apply all available migrations
journey --url driver://url --path ./migrations migrate up

# roll back all migrations
journey --url driver://url --path ./migrations migrate down

# roll back the most recently applied migration, then run it again.
journey --url driver://url --path ./migrations migrate redo

# run down and then up command
journey --url driver://url --path ./migrations migrate reset

# show the current migration version
journey --url driver://url --path ./migrations migrate version

# apply the next n migrations
journey --url driver://url --path ./migrations migrate migrate +1
journey --url driver://url --path ./migrations migrate migrate +2
journey --url driver://url --path ./migrations migrate migrate +n

# roll back the previous n migrations
journey --url driver://url --path ./migrations migrate migrate -1
journey --url driver://url --path ./migrations migrate migrate -2
journey --url driver://url --path ./migrations migrate migrate -n

# go to specific migration
journey --url driver://url --path ./migrations migrate goto 1
journey --url driver://url --path ./migrations migrate goto 10
journey --url driver://url --path ./migrations migrate goto v

CronJobs

Journey also provides a command to run scheduled jobs on databases:

journey --url driver://url --path ./cronjobs scheduler start

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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