No-frills migration utility for PostgreSQL and SQLite.
- 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.)
go get github.com/matthewmueller/migrate
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
- Generic driver interface
- Matt Mueller https://twitter.com/mattmueller
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
MIT