WIP cleaned up migrations

This commit is contained in:
Josh Harvey 2014-11-24 23:38:14 -05:00
parent 78f8d08d7d
commit fe008a9db6
4 changed files with 57 additions and 57 deletions

View file

@ -10,14 +10,24 @@ exports.query = function query(sql, cb) {
exports.multi([sql], cb);
};
exports.multi = function multi(sqls, cb) {
exports.silentQuery = function query(sql, cb) {
pg.connect(conString, function(err, client, done) {
if (err) throw err;
async.eachSeries(sqls, client.query.bind(client), function(err) {
if (err) return cb(err);
client.query(sql, function(err) {
done(true);
if (err) throw err;
cb();
cb(err);
});
});
};
exports.multi = function multi(sqls, cb) {
pg.connect(conString, function(err, client, done) {
if (err) return cb(err);
async.eachSeries(sqls, client.query.bind(client), function(err) {
done(true);
if (err) console.log(err);
cb(err);
});
});
};