Skip to content

Instantly share code, notes, and snippets.

@ebramanti
Last active March 4, 2016 22:38
Show Gist options
  • Save ebramanti/672801f21076ae564be2 to your computer and use it in GitHub Desktop.
Save ebramanti/672801f21076ae564be2 to your computer and use it in GitHub Desktop.
const Promise = require('bluebird');
Promise.series = (promiseArr) => Promise.each(promiseArr, (result) => result);
exports.up = function(knex) {
return Promise.series([
knex.schema.renameTable('tomatoes', 'potatoes'),
knex.schema.table('potatoes', (table) => table.string('name'))
]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment