visionmedia/node-migrate — pull request #14 by slajax (2012-07-17 23:35:39+00:00)
Title: General improvements for --chdir

## New Usage

```
Usage: migrate [options] [command]

Options:

-e, --env change the environment

Commands:

down migrate down
up migrate up (the default command)
create [title] create a new migration file with optional [title]
copy [to, from] copy migrations from one environment context to another

```

## Running Migrations with Environment Context

$ migrate -e dev create
create : migrations/dev/001.js

$ migrate -e dev up
up : migrations/dev/001.js
migration : complete

$ migrate -e dev down
down : migrations/dev/001.js
migration : complete

$ migrate copy dev prod
copying : migrations/dev/001.js to migrations/prod/001.js

$ migrate -e prod up
up : migrations/prod/001.js
migration : complete

$ migrate -e prod down
down : migrations/prod/001.js
migration : complete