dmanjunath / node-redshift

A simple collection of tools to help you get started with Amazon Redshift from node.js
69 stars 48 forks source link

Accept promises in the migration interface #19

Open thalesmello opened 7 years ago

thalesmello commented 7 years ago

I think it would be nice if instead of

exports.up = function(next) {
  // something
  next();
};

It would be nice to write

exports.up = function() {
  return query('Something')
};

It would even allow as to use async functions in the queries, making it even nicer

exports.up = async function() {
  await query('something')
};