matthewmueller / migrate

No-frills migration utility for postgres

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

migrate

GoDoc

No-frills migration utility for PostgreSQL and SQLite.

Features

  • Stable and in use across 10+ projects over 3 years.
  • Supports migrations from a virtual file-system
  • Supports several SQLite3 modules (full-text search, json, foreign keys, etc.)

Installation

go get github.com/matthewmueller/migrate

Usage

Usage:

  migrate [<flags>] <command> [<args> ...]

Flags:

  -h, --help             Output usage information.
      --dir="./migrate"  migrations directory
      --table="migrate"  table name
      --db=DB            database url (e.g. 'postgres://localhost:5432/db')

Commands:

  help                 Show help for a command.
  new                  create a new migration
  up                   migrate up
  down                 migrate down
  reset                reset all down then up migrations
  redo                 redo the last migration
  info                 info on the current migration

Help Wanted

  • Generic driver interface

Authors

Running Tests

The tests depend on a local PostgreSQL database being present. Make sure you have PostgreSQL installed and then run the following from your terminal:

createdb migrate-test

Then you should be able to run:

make test

License

MIT

About

No-frills migration utility for postgres


Languages

Language:Go 97.1%Language:Makefile 2.9%