Forked from jeonghwan-kim/add-multiple-column-in-sequelize-migration.js
Created
April 21, 2019 16:13
-
-
Save Mohit21GoJs/912f0b2868960e7f2406b437c49a6a0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
up: function (queryInterface, Sequelize) { | |
return Promise.all([ | |
queryInterface.addColumn('User', 'name', { | |
type: Sequelize.STRING | |
}), | |
queryInterface.addColumn('User', 'nickname', { | |
type: Sequelize.STRING, | |
}) | |
]); | |
}, | |
down: function (queryInterface, Sequelize) { | |
return Promise.all([ | |
queryInterface.removeColumn('Challenges', 'name'), | |
queryInterface.removeColumn('Challenges', 'nickname') | |
]); | |
} | |
}; |
Thanks, @Mohit21GoJs
I love u dud. thanks 4ever.
you are welcome :D glad it helped you ๐
Thanks, @Mohit21GoJs
you are welcome ๐
Thankyou man
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I love u dud. thanks 4ever.