'use strict';

module.exports = {
  up: function (queryInterface, Sequelize) {
    queryInterface.renameColumn("Invoices", "totalAmount", "totalAmountInCents")
  },

  down: function (queryInterface, Sequelize) {
    queryInterface.renameColumn("Invoices", "totalAmountInCents", "totalAmount")
  }
};

'use strict';

module.exports = {
    up: function (queryInterface, Sequelize, done) {
        queryInterface.renameColumn("Invoices", "totalAmount", "totalAmountInCents").nodeify(done);
  },

    down: function (queryInterface, Sequelize, done) {
        queryInterface.renameColumn("Invoices", "totalAmountInCents", "totalAmount").nodeify(done);
  }
};

fix the change totalAmount to totalAmountInCents migration so it waits for the migration to actually finish