WIP cleaned up migrations
This commit is contained in:
parent
78f8d08d7d
commit
fe008a9db6
4 changed files with 57 additions and 57 deletions
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue