visionmedia/node-migrate — pull request #15 by Laboratory (2012-07-30 23:08:22+00:00)
Title: Added enviroment for migrations

In methods 'up' and 'down' added environment for select db.

````javascript
var db = require('./db');
var db_prod = require('./db.production');

function getDb(env) {
var res = db;
if(env == 'production'){
res = db_prod;
}
return (res);
}

exports.up = function(next, env) {
getDb(env).quey("");
next();
};

exports.down = function(next, env) {
getDb(env).quey("");
next();
};
````