Skip to content

Instantly share code, notes, and snippets.

@kianaditya
Created June 26, 2020 07:56
Show Gist options
  • Save kianaditya/52a873fda2a9923c4a6df7cc66a4bf74 to your computer and use it in GitHub Desktop.
Save kianaditya/52a873fda2a9923c4a6df7cc66a4bf74 to your computer and use it in GitHub Desktop.
'use strict'
module.exports = {
up: (queryInterface, Sequelize) => {
return Promise.all([
queryInterface.addColumn('Users', 'email', {
type: Sequelize.STRING,
allowNull: false,
}),
queryInterface.addColumn('Users', 'encryptedPassword', {
type: Sequelize.STRING,
allowNull: false,
}),
])
},
down: (queryInterface, Sequelize) => {
return Promise.all([
queryInterface.removeColumn('Users', 'email'),
queryInterface.removeColumn('Users', 'encryptedPassword'),
])
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment